v1

latestOpenAPI 3.0.0Apache 2.02026-07-142008071.1 MB
OAuth

RevokeToken

Revokes an access token generated with the OAuth flow.

If an account has more than one OAuth access token for your application, this endpoint revokes all of them, regardless of which token you specify. When an OAuth access token is revoked, all of the active subscriptions associated with that OAuth token are canceled immediately.

Important: The Authorization header for this endpoint must have the following format:

Authorization: Client APPLICATION_SECRET

Replace APPLICATION_SECRET with the application secret on the OAuth page in the developer dashboard.

post/oauth2/revoke

Request body

access_tokenstring

The access token of the merchant whose token you want to revoke. Do not provide a value for merchant_id if you provide this parameter.

client_idstring

The Square issued ID for your application, available from the developer dashboard.

merchant_idstring

The ID of the merchant whose token you want to revoke. Do not provide a value for access_token if you provide this parameter.

revoke_only_access_tokenboolean

If true, terminate the given single access token, but do not terminate the entire authorization. Default: false

Example request

{
  "request_body": {
    "access_token": "ACCESS_TOKEN",
    "client_id": "CLIENT_ID"
  }
}

Response

Success

successboolean

If the request is successful, this is true.

Example response

{
  "success": true
}