revoke_token(**kwargs)¶Revokes all of the access tokens generated by, and at the same time as, the specified refresh token. After a token is revoked, you can't use the revoked token to access Amazon Cognito user APIs, or to authorize access to your resource server.
See also: AWS API Documentation
Request Syntax
response = client.revoke_token(
Token='string',
ClientId='string',
ClientSecret='string'
)
[REQUIRED]
The refresh token that you want to revoke.
[REQUIRED]
The client ID for the token that you want to revoke.
dict
Response Syntax
{}
Response Structure
Exceptions
CognitoIdentityProvider.Client.exceptions.TooManyRequestsExceptionCognitoIdentityProvider.Client.exceptions.InternalErrorExceptionCognitoIdentityProvider.Client.exceptions.UnauthorizedExceptionCognitoIdentityProvider.Client.exceptions.InvalidParameterExceptionCognitoIdentityProvider.Client.exceptions.UnsupportedOperationExceptionCognitoIdentityProvider.Client.exceptions.UnsupportedTokenTypeExceptionCognitoIdentityProvider.Client.exceptions.ForbiddenException