Authorization Revocation
Use this interface to cancel the authorization of a user to the merchant. Alipay makes the access token invalid after receiving the cancellation request, and then the merchant cannot access the user resource scope with the access token. Also, the merchant cannot use the related refresh token to obtain a new access token.
Request parameters
Collapse All
accessTokenString(128)Required
An access token that can be used to access the user resource scope
Response parameters
Collapse All
resultResultRequired
The request result, which contains information related to the request result, such as status and error codes.
resultCodeString(16)Required
Result code
resultStatusEnumRequired
Result status. Possible values are:
- S: Indicates that the result status is successful.
- F: Indicates that the result status is failed.
- U: Indicates that the result status is unknown.
resultMessageString(64)Optional
Result message
Result process logic
For different request results, different actions are to be performed. See the following list for details:
- If the value of result.resultStatus is
S, then the authorization is successfully cancelled. AuthClient will not be able to use AccessToken to access user's resources and use the relative refreshToken to retrieve new AccessToken. - If the value of result.resultStatus is
U, retry the process. - If the value of result.resultStatus is
F, system defects or system failure occurred. It is suggested to monitor and check the system manually.
Result/Error codes
| Code | Value | Message |
|---|---|---|
| SUCCESS | S | Success |
| INVALID_ACCESS_TOKEN | F | Invalid access token |
| PARAM_ILLEGAL | F | Illegal parameters exist. For example, a non-numeric input, or an invalid date. |
| PROCESS_FAIL | F | A general business failure occurred. Do not retry. |
| KEY_NOT_FOUND | F | The key is not found. |
| ACCESS_DENIED | F | Access denied |
| REQUEST_TRAFFIC_EXCEED_LIMIT | U | The request traffic exceeds the limit. |
| API_INVALID | F | API is invalid or not active. |
| CLIENT_INVALID | F | The client is invalid. |
| SIGNATURE_INVALID | F | The signature is invalid. |
| METHOD_NOT_SUPPORTED | F | The server does not implement the requested HTTP method. |
| MEDIA_TYPE_NOT_ACCEPTABLE | F | The server does not implement the media type that is acceptable to the client. |
| UNKNOWN_EXCEPTION | U | An API calling is failed, which is caused by unknown reasons. |
Request/Response Code
Request
Method
POST
Endpoint
v1/authorizations/revoke
Header
Accept: application/json
URL
Domain name
Request Body
Request parameters
Response Body
Body content