RetrieveTokenStatus API: Sandbox support and required credentials

Hello Square Developer Team,

I’m building an application that uses Square OAuth in the Sandbox environment. Before running any API requests with a newly issued Sandbox OAuth access token, I would like to confirm the supported and secure way to verify its identity.

According to the RetrieveTokenStatus API documentation:

The response can include the client_id, merchant_id, scopes, and expiration information.

Could you please clarify the following?

  1. Is RetrieveTokenStatus officially supported for Sandbox OAuth access tokens?

  2. If so, is the correct endpoint https://connect.squareupsandbox.com/oauth2/token/status?

  3. What authentication credentials and authorization header format should be used for this endpoint in Sandbox? Should the Sandbox application secret or another credential be used?

  4. Can we reliably use the returned client_id and merchant_id to verify that an OAuth access token belongs to the intended Sandbox application and test seller?

  5. Is there a recommended alternative if RetrieveTokenStatus is not supported in Sandbox?

Our goal is to verify the application and seller identity before performing read-only API operations. We will not share access tokens, application secrets, or customer information.

Thank you for your guidance.

  1. Yes, RetrieveTokenStatus works with Sandbox OAuth access tokens.
  2. Endpoint: POST https://connect.squareupsandbox.com/oauth2/token/status, with no request body.
  3. Auth: put the access token you want to check in the header as Authorization: Bearer <SANDBOX_ACCESS_TOKEN>. The application secret isn’t used for this call. Include a Square-Version header as you would on any other request.
  4. Verification: yes. Check that client_id matches your Sandbox application ID and that merchant_id matches the test seller you expect. Check scopes and expires_at too before you make calls. An invalid or expired token returns UNAUTHORIZED.
  5. Make sure Sandbox tokens only go to the squareupsandbox.com host. Production tokens go to connect.squareup.com.