You are viewing an old version of the API
Renew token

Deprecated

RenewToken is deprecated

For information about refreshing OAuth access tokens, see Renew OAuth Token.

Renews an OAuth access token before it expires.

OAuth access tokens besides your application's personal access token expire after 30 days. You can also renew expired tokens within 15 days of their expiration. You cannot renew an access token that has been expired for more than 15 days. Instead, the associated user must re-complete the OAuth flow from the beginning.

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 Credentials page in the application dashboard.


Path Parameters

Name Description
client_id
string

Required

Your application ID, available from the application dashboard.

Request Body

Name Description
access_token
string

The token you want to renew.

Response Fields

Name Description
access_token
string

The renewed access token. This value might be different from the access_token you provided in your request. You provide this token in a header with every request to Connect API endpoints. See Request and response headers for the format of this header.

expires_at
string

The date when access_token expires, in ISO 8601 format.

merchant_id
string

The ID of the authorizing merchant's business.

plan_id
string

LEGACY FIELD. The ID of the subscription plan the merchant signed up for. Only present if the merchant signed up for a subscription during authorization.

subscription_id
string

LEGACY FIELD. The ID of the merchant subscription associated with the authorization. Only present if the merchant signed up for a subscription during authorization..

token_type
string

This value is always bearer.

Examples

You are viewing an old version of the API
POST /oauth2/clients/{client_id}/access-token/renew
cURL
  • cURL
curl https://connect.squareup.com/oauth2/clients/{client_id}/access-token/renew \
  -X POST \
  -H 'Square-Version: 2019-11-20' \
  -H 'Authorization: Client APPLICATION_SECRET' \
  -d '{
    "access_token": "ACCESS_TOKEN"
  }'
Response JSON
{
  "access_token": "ACCESS_TOKEN",
  "token_type": "bearer",
  "expires_at": "2006-01-02T15:04:05Z",
  "merchant_id": "MERCHANT_ID"
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?