Overview
The Generate Access Token call will return a JSON object containing a temporary “token_id” which can be used for all the platform-level API calls. Please note this API cannot be called more than 5 times per minute.
API URL
https://webapi.ubibot.com/accounts/generate_access_token?parameters
HTTP Method
GET/POST
URL Parameters
Name |
Type |
Required |
Description |
account_key |
String |
Required |
Unique key for each account. Used for all account-level authentication requests. It can be found on the web console panel-> Account->Security page. |
expire_in_seconds |
Integer |
Optional |
Specify the temporary access token expiration time in seconds. The default value is 3600 seconds (one hour). Minimum value is 60 seconds. |
Response
An HTTP code of 200 is responded for each successful data requests. The message body contains a JSON object containing a temporary “token_id”.
Error: See the separate list of error codes for more details.
Examples
GET https://webapi.ubibot.com/accounts/generate_access_token?account_key=xxxxx-xxxxx-xxxxx-xxxx
The response:
{
"result": "success",
"server_time": "2020-04-12T01:19:20Z",
"token_id": "a7b063**********1d35603",
"expire_time": "2020-04-12T02:19:20Z",
"account": {
"user_id": "D1E393E3-*******-94B1-A5AB66E53650",
"email_status": "live",
"token_id": "a7b063**********1d35603"
},
"token_type": "user",
"login_type": "token_by_account_key"
}