POST /oauth2/revoke

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.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
client_id String No

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

access_token String No

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.

revoke_only_access_token Boolean No

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

merchant_id String No

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

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.