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
- 201
- 400
- 403
- 404
- 500
Storefront token created
Bad Request
Forbidden
Not Found
Internal Server Error
Error Codes
| HTTP Status | Class | Code | Description |
|---|---|---|---|
| 400 | invalid_request | invalid_body_parameters | Invalid body parameters with details in the fields attribute, e.g. an `expires_at` that is in the past or more than 24 hours ahead |
| 403 | forbidden | storefronts_not_enabled | Storefronts are not enabled for the client |
| 404 | not_found | entity_not_found | The storefront with the given ID was not found |