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
One of:
  • channel_ids
    array[integer]
    required

    A list of channel IDs that are valid for the requested token. Use this field if you have more than one channel ID. You can not use both channel_id and channel_ids in your request.
    Type: array[integer]
    Example: [667251,1]
One of:
  • channel_ids
    array[integer]
    required

    A list of channel IDs that are valid for the requested token. Use this field if you have more than one channel ID. You can not use both channel_id and channel_ids in your request.
    Type: array[integer]
    Example: [667251,1]

example

{
"expires_at": 1885635176,
"channel_ids": [
667251,
1
]
}

Response

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example

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