POST /v1/authorizations/cancelToken
Cancels an access token at the wallet, revoking the authorization. After cancellation, the related refreshToken can no longer be used, even if it has not expired.
Request Parameters
Either
accessToken or contractId must be provided (at least one is required).The access token to cancel, obtained from applyToken. No special characters (
@, #, ?).Max length: 128 charactersThe agreement contract ID to cancel (agreement scenarios). Required if
accessToken is not provided.Extended information (JSON string). No special characters (
@, #, ?). Key:customerBelongsTo: the e-wallet the customer uses, corresponding to thesiteNamefrommy.getSiteInfo. Mandatory in the Mini Program scenario.
Response Parameters
Result Handling
result.resultStatusisS: the authorization is cancelled. TheaccessTokencan no longer be used to access the user’s resources, and the relatedrefreshTokencannot be used to get a new access token.result.resultStatusisForU: cancellation failed. Guide the user to try again.
Result Codes
Sample
When the user cancels the authorization from the Mini Program, the merchant server calls/v1/authorizations/cancelToken and the wallet returns the result.