Creating an AppCode
Function
An AppCode is a sub-module of an app and can be used for simple app authentication. This API is used to create an AppCode.
URI
The following table lists the HTTP/HTTPS request method and URI of the API.
Request Method |
URI |
---|---|
POST |
/v1.0/apigw/apps/{app_id}/app-codes |
The following table lists the parameters in the URI.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
app_id |
Yes |
String |
App ID |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
app_code |
Yes |
String |
App name An app name consists of 64–180 characters, starting with a letter, plus sign (+), or slash (/). Only letters and the following special characters are allowed: +_!@#$%/= |
Example request:
{ "app_code": "GjOD3g80AABuuFeEJpVQADBlAjBh3UzC7W+gr4VJBB5BtJ4fdVOQoSvoji3gFxUDb5pWBz9wUcw9+8/bFZ1B/4pq29wCMQC0pQWX6zTndljDEl99As1pw+WntAU9xcq+ffagoH6zDpKUvdxV6Ezj8LcCcPZN6BU=" }
Response
Parameter |
Type |
Description |
---|---|---|
id |
String |
AppCode ID |
app_code |
String |
AppCode value |
app_id |
String |
App ID |
create_time |
Timestamp |
Time when the AppCode is created |
Example response:
{ "app_code": "GjOD3g80AABuuFeEJpVQADBlAjBh3UzC7W+gr4VJBB5BtJ4fdVOQoSvoji3gFxUDb5pWBz9wUcw9+8/bFZ1B/4pq29wCMQC0pQWX6zTndljDEl99As1pw+WntAU9xcq+ffagoH6zDpKUvdxV6Ezj8LcCcPZN6BU=", "id": "2fb07c4391d0401696ed345dd1229158", "app_id": "db246f3f2ecd45f29ecb0f305e821fdc", "create_time": "2019-06-05T04:57:14.470987604Z" }
Status Codes
Status Code |
Description |
---|---|
201 |
Created |
400 |
Bad Request |
401 |
Unauthorized |
403 |
Forbidden |
500 |
Server Internal Error |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot