Customer Impersonation Token

Create a Token

POST /storefront/api-token-customer-impersonation

Request

Returns a Storefront API token that allows your application to impersonate customers when making GraphQL POST requests. For more information on how to use the returned token, see customer impersonation tokens.

Required Scopes

  • Manage Storefront API Customer Impersonation Tokens

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
    required
    The MIME type of the response body.
  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.

Body

object | application/json
  • channel_id
    integer
    required

    Channel ID for requested token
    Min: 1
    Example: 1
  • expires_at
    integer
    required

    Unix timestamp (UTC time) defining when the token should expire. Supports seconds, but does not support milliseconds, microseconds, or nanoseconds.
    Min: 0
    Example: 1885635176

example

{
"channel_id": 1,
"expires_at": 1885635176
}

Response

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

{
"data": {
"token": "string"
},
"meta": {}
}
Did you find what you were looking for?