POST
/
partner
/
oauth
/
token

Scope required: auth.create

This endpoint allows for the programmatic generation of an API access token for a given user. This access token can then be used to access the Consumer API.

Programmatic generation of access tokens on behalf of users is designed for Kiosk integrations to facilitate user reward redemption, hence the limited TTL of each token generated.

Parameters

merchant_id
string
required

Merchant ID

user_id
string

Thanx User ID. One of user_id, email, or phone must be specified.

email
string

Email address. One of user_id, email, or phone must be specified.

phone
string

Email address. One of user_id, email, or phone must be specified.

expires_in
integer

The number of seconds after which this access token will expire. Defaults to 900 seconds (15 minutes). The maximum allowed expiration for a partner-generated token is 3600 seconds (1 hour). The minimum expiration is 60 seconds.

Response

access_token
string

The user’s access token, for use in accessing the Consumer API

token_type
string

The type of token, “Bearer”

scope
string

The API scopes granted to the access token

created_at
integer

The number of seconds since the epoch

expires
integer

The number of seconds after which this access token will expire