Skip to main content

Create a storefront token

POST 

/storefronts/:id/tokens

Create a short-lived token that signs a customer into a storefront.

In development

This endpoint is in development and might change, including in ways that are not backwards-compatible.

Hand the token to the customer's browser: the storefront exchanges it for a session. The token is bound to the storefront and to the given customer, and stops working at expires_at.

Request​

Responses​

Storefront token created

Error Codes

HTTP StatusClassCodeDescription
400invalid_requestinvalid_body_parametersInvalid body parameters with details in the fields attribute, e.g. an `expires_at` that is in the past or more than 24 hours ahead
403forbiddenstorefronts_not_enabledStorefronts are not enabled for the client
404not_foundentity_not_foundThe storefront with the given ID was not found