Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 2.26 KB

obtain-token-response.md

File metadata and controls

33 lines (25 loc) · 2.26 KB

Obtain Token Response

Structure

Obtain Token Response

Fields

Name Type Tags Description
access_token string Optional A valid OAuth access token. OAuth access tokens are 64 bytes long.
Provide the access token in a header with every request to Connect API
endpoints. See OAuth API: Walkthrough
for more information.
Constraints: Minimum Length: 2, Maximum Length: 1024
token_type string Optional This value is always bearer.
Constraints: Minimum Length: 2, Maximum Length: 10
expires_at string Optional The date when access_token expires, in ISO 8601 format.
Constraints: Minimum Length: 20, Maximum Length: 48
merchant_id string Optional The ID of the authorizing merchant's business.
Constraints: Minimum Length: 8, Maximum Length: 191
subscription_id string Optional LEGACY FIELD. The ID of a subscription plan the merchant signed up
for. Only present if the merchant signed up for a subscription during authorization.
plan_id string Optional 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.
id_token string Optional Then OpenID token belonging to this this person. Only present if the
OPENID scope is included in the authorize request.
refresh_token string Optional A refresh token. OAuth refresh tokens are 64 bytes long.
For more information, see OAuth access token management.
Constraints: Minimum Length: 2, Maximum Length: 1024
short_lived bool Optional A boolean indicating the access token is a short-lived access token.
The short-lived access token returned in the response will expire in 24 hours.

Example (as JSON)

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