Create a token
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
ManageStorefront API Customer Impersonation Tokens
NOTE: While neither
channel_idnorchannel_idsis labelled as required, one must be included in the request body. Including neither will throw an error, and including both will result in unexpected behaviors.
Authentication
OAuth scopes
Authentication header
Further reading
For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.
For more about BigCommerce OAuth scopes, see our Guide to API Accounts.
Path parameters
Headers
The MIME type of the response body.
Request
Unix timestamp (UTC time) defining when the token should expire. Supports seconds, but does not support milliseconds, microseconds, or nanoseconds.
Channel ID that is valid for the requested token. Use this field to enter a single channel ID. We support this field for backwards compatibility, but channel_ids is preferred. One of channel_id or channel_ids is required; including neither returns an error, and including both results in unexpected behavior.
A list of channel IDs that are valid for the requested token. Use this field for one or more channel IDs. One of channel_id or channel_ids is required; including neither returns an error, and including both results in unexpected behavior.
Optional label for the token. Surfaced by the list endpoints to help you identify tokens. Trimmed server-side and never included in the JWT. Must not contain 4-byte characters such as emoji.