getAuthTokenUseCode
Use getAuthCode
to obtain a token. Please call getAuthTokenUseCode
within ten minutes, or the code will expire.This API provides an authentication token upon successful login.
Request:
example
{
"grant_type":"authorization_code",
"client_id":"arctos-webapp",
"code":"XXXXXXXXXXX",
"redirect_uri":"https://XXXXX.XXX.XXX"
}
Parameter | Meaning | Type | Required | Default value | Description |
---|---|---|---|---|---|
HEADERS | |||||
Content-Type | string | Y | application/json | ||
BODY | |||||
grant_type | Authorization Type Requested by Client | string | Y | This parameter is used to specify the grant type. | |
client_id | Source of Customer | string | Y | webapp_user | arctos-webapp:browser |
arctos-switch:moderator_device | |||||
arctos-client:publisher_device | |||||
code | account | string | Y | Please fill in a unique identifiable value. | |
redirect_uri | string | N | The page that will be returned |
Response:
{
"status": 1,
"message": "",
"info": {
"user_id": 1010000010,
"access_token": "eyJ0eXAiOiJKV1QiLCXXXXXXXXX"
}
}
Parameter | Meaning | Type | Existed | Default value | Description |
---|---|---|---|---|---|
BODY | |||||
status | response status | string | Y | 0: fail | |
1: success | |||||
2: warning | |||||
message | message | string | Y | “” | Error messages should be shown when there are errors. |
info | Return Information | object | |||
user_id | userID in ihh | number | Y | ||
access_token | User Authentication Token | string | Y |
Error code:
The following is a table of error messages returned by the API.
Code | Status | Error | Message |
---|---|---|---|
200 | 1 | success | |
0 | Unauthorized Access | ||
404 | Resource Not Found | ||
403 | Access to the requested resource is not allowed |