Alipay, China's leading third-party online payment solutionAlipay, China's leading third-party online payment solutionDOCS

      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

      accessTokenString(128)Required
      An access token that can be used to access the user resource scope

      Response parameters

      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

      CodeValueMessage
      SUCCESSSSuccess
      INVALID_ACCESS_TOKENFInvalid access token
      PARAM_ILLEGALFIllegal parameters exist. For example, a non-numeric input, or an invalid date.
      PROCESS_FAILFA general business failure occurred. Do not retry.
      KEY_NOT_FOUNDFThe key is not found.
      ACCESS_DENIEDFAccess denied
      REQUEST_TRAFFIC_EXCEED_LIMITUThe request traffic exceeds the limit.
      API_INVALIDFAPI is invalid or not active.
      CLIENT_INVALIDFThe client is invalid.
      SIGNATURE_INVALIDFThe signature is invalid.
      METHOD_NOT_SUPPORTEDFThe server does not implement the requested HTTP method.
      MEDIA_TYPE_NOT_ACCEPTABLEFThe server does not implement the media type that is acceptable to the client.
      UNKNOWN_EXCEPTIONUAn 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