This type of token is the most appropriate to use from a web browser when you're serving a static site that only supports anonymous shopping. If you're creating a token for backend implementation, you wish to support signing in customers, or you're developing a frontend app that proxies requests, such as a NextJS app, use a customer impersonation token.
Customer impersonation tokens
Customer impersonation token-authenticated requests receive store information from the perspective of the customer with the ID specified in the X-Bc-Customer-Id header. The customer will automatically see the correct pricing, product availability, order history, and account details.
This special token is not necessary if you only wish to query information from an anonymous shopper's perspective.
Warning
Unless your frontend client proxies requests, attempts to authenticate from the brower using customer impersonation tokens will be rejected.
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_idschannel_id
channel_idsarray[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.
Revoke access for a Storefront API token. Only revoke compromised tokens under emergency situations. Let uncompromised short-lived tokens expire naturally, as you do not need to revoke these.
Authentication
X-Auth-Token in headerAuthentication details
Parameters
store_hash in path - string
Accept in header with default of application/json - string