v1

latestOpenAPI 3.0.0Apache 2.02026-07-142008071.1 MB
OAuth

RenewToken

RenewToken is deprecated. For information about refreshing OAuth access tokens, see Migrate from Renew to Refresh OAuth Tokens.

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 developer dashboard.

post/oauth2/clients/{client_id}/access-token/renew

Path parameters

client_idstring required

Your application ID, available from the developer dashboard.

Request body

access_tokenstring

The token you want to renew.

Example request

{
  "request_body": {
    "access_token": "ACCESS_TOKEN"
  }
}

Response

Success

access_tokenstring

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_atstring

The date when access_token expires, in ISO 8601 format.

merchant_idstring

The ID of the authorizing merchant's business.

plan_idstring

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_idstring

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_typestring

This value is always bearer.

Example response

{
  "access_token": "ACCESS_TOKEN",
  "expires_at": "2006-01-02T15:04:05Z",
  "merchant_id": "MERCHANT_ID",
  "token_type": "bearer"
}