Get Storefront authToken Within Stencil
Uses a JSON web token (JWT) from a particular customer or Company user who is currently logged in to the storefront to create a storefront authToken for future requests.
To learn more about how you can retrieve a JWT to create a storefront authToken. See Authentication for hosted storefronts.
Equivalent Storefront GraphQL API Mutation: authorization.
Example GraphQL API Body
copy
Example GraphQL API Response
copy
Request
This endpoint expects an object.
bcToken
The JSON Web Token (JWT) obtained from a signed-in Company user. See Current Customer API to learn how to request a JWT.
storeHash
The unique store hash for the BigCommerce store.
channelId
The storefront channel ID associated with the storefront login session. Use 1 for your store’s default storefront channel.
customerId
The BigCommerce customer ID associated with a Company user.
Response
OK
code
data
message