Issue Customer Token (for Storefront Auth)
curl --request POST \
--url https://api.headlesscommerce.io/v1/admin/customers/{id}/token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expires_in": 86400
}
'{
"token": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}Admin - Customers
Issue Customer Token (for Storefront Auth)
Called from the store backend (sk_* key) to issue a customer token. The frontend passes this token via the X-Customer-Token header to access /storefront/customers/me, /storefront/orders, etc.
POST
/
admin
/
customers
/
{id}
/
token
Issue Customer Token (for Storefront Auth)
curl --request POST \
--url https://api.headlesscommerce.io/v1/admin/customers/{id}/token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expires_in": 86400
}
'{
"token": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}Authorizations
API Key. Example: sk_live_xxxxx or pk_live_xxxxx
Path Parameters
Resource ID
Body
application/json
Token expiration time (seconds). Default: 86400 (24 hours)
⌘I