Refresh tokenSignature required
Access tokens expires 30 days from they are granted. You can refresh or extend an access token by using the refreshToken API.
Structure
A message consists of a header and body. The following sections are focused on the body structure. For the header structure, see:
Request parameters
refreshToken String REQUIRED
The refresh token that is returned by the applyToken API.
grantType String REQUIRED
The authorization grant type. Valid value:
REFRESH_TOKEN
: indicates that the refresh token is used to obtain the access token.
Response parameters
result Result REQUIRED
The result of the API call, including the result status, result code and result message.
accessToken String REQUIRED
The access token.
Note: This parameter is returned on demand only when result.resultStatus =
S
.
expireTime DateTime REQUIRED
The expiration time of the access token.
Note: This parameter is returned on demand only when result.resultStatus = S.
More information:
- The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".
refreshToken String
The refresh token.
Note: This parameter is returned on demand only when result.resultStatus = S.
refreshTokenExpireTime DateTime
The expiration time of the refresh token.
Note: This parameter is returned on demand only when result.resultStatus = S.
More information:
- The value follows the ISO 8601 standard format. For example, "2019-11-27T12:01:01+08:00".
extendInfo String
The extended information.
Note: This parameter is returned on demand only when result.resultStatus = S.
Request
Response
Result processing logic
After calling the API, WorldFirst returns a response. The responses for result.resultStatus are:
Result/Error codes
Code | Value | Message | Further action |
---|---|---|---|
SUCCESS | S | Success | |
PROCESS_FAIL | F | A general business failure occurred. Do Not retry. | Human intervention is usually needed. It is recommended that you contact our Technical Support Team to resolve the issue. |
PARAM_ILLEGAL | F | Illegal parameters exist. For example, a non-numeric input, or an invalid date. | Check and verify whether the request fields (e.g., requestId), including the header fields and body fields, are correct and valid. For details on the fields of each API, see the specific API Structure section. |
INVALID_API | F | The called API is invalid or not active. | Check whether the correct API is being called. |
INVALID_CLIENT | F | The client is invalid. | The client ID does not exist or is invalid. |
INVALID_SIGNATURE | F | The signature is invalid. | Ensure the HTTP method is |
METHOD_NOT_SUPPORTED | F | The server does not implement the requested HTTP method. | Ensure the HTTP method is |
UNKNOWN_EXCEPTION | U | The API call is failed, which is caused by unknown reasons. | The service might be down, retry later. If the issue persists, contact the WorldFirst Technical Support Team. |
UN_SUPPORT_BUSINESS | F | Unsupported business. | Ensure that all the request parameters are correct and try to call the API again. |
AUTHORIZATION_NOT_EXIST | F | The authorization does not exist. | Retry the authorization process. If the issue persists, contact the WorldFirst Technical Support Team. |