v1

latestOpenAPI 3.0.0Apache 2.02026-07-143281,4552.1 MB
OAuth

RetrieveTokenStatus

Returns information about an OAuth access token or an application’s personal access token.

Add the access token to the Authorization header of the request.

Important: The Authorization header you provide to this endpoint must have the following format:

Authorization: Bearer ACCESS_TOKEN

where ACCESS_TOKEN is a valid production authorization credential.

If the access token is expired or not a valid access token, the endpoint returns an UNAUTHORIZED error.

post/oauth2/token/status

Response

Success

scopesstring[]

The list of scopes associated with an access token.

expires_atstring

The date and time when the access_token expires, in RFC 3339 format. Empty if the token never expires.

client_idstring

The Square-issued application ID associated with the access token. This is the same application ID used to obtain the token.

merchant_idstring

The ID of the authorizing merchant's business.

Example response

{
  "client_id": "CLIENT_ID",
  "expires_at": "2022-10-14T14:44:00Z",
  "merchant_id": "MERCHANT_ID",
  "scopes": [
    "PAYMENTS_READ",
    "PAYMENTS_WRITE"
  ]
}