Revoke a token

Revoke a token and its lineage.

Revoke an access token or a refresh token.

If you revoke a refresh token, be aware that:

  • The refresh token's lineage is also revoked. This means that access tokens created from that refresh token are also revoked.
  • The user's consent for your integration is also revoked. This means that the user must go through the OAuth process again to use your integration.

Requests to this endpoint require authentication with your client ID and client secret, using one of the following methods:

  • Basic access authentication (Recommended): For basic access authentication, the {credentials} string must be a Base64 encoded value of {client id}:{client secret}.
  • Body parameters: Provide your integration's credentials using the client_id and client_secret body parameters.
POST https://api.canva.com/rest/v1/oauth/revoke

This endpoint uses HTTP basic access authentication and requires no scopes.

#Authorizationstring
Optional

Provides credentials to authenticate the request, in the form of basic access authentication.

For example: Authorization: Basic {credentials}

#Content-Typestring
Required

Indicates the media type of the information sent in the request. This must be set to application/x-www-form-urlencoded.

For example: Content-Type: application/x-www-form-urlencoded

#tokenstring
Required

The token to revoke.

#client_idstring
Optional

Your integration's unique ID, for authenticating the request.

#client_secretstring
Optional

Your integration's client secret, for authenticating the request. Begins with cnvca.

Examples for using the /v1/oauth/revoke endpoint:

curl --request POST 'https://api.canva.com/rest/v1/oauth/revoke' \
--header 'Authorization: Basic {credentials}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'token=agALLazU0i2ld9WW4zTO4kaG0lkvP8Y5sSO206ZwxNF4E1y3xKJKF7TzN17BXTfaNOeY0P88AeRCE6cRF7SJzvf3Sx97rA80sGHtFplFo' \
--data-urlencode 'client_id=OC-FAB12-AbCdEf' \
--data-urlencode 'client_secret=cnvcaAbcdefg12345_hijklm6789'
sh

If successful, the endpoint returns a 200 response with an empty JSON body.

{}
json