Skip to main content
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

Authorization
string
header
required

API Key. Example: sk_live_xxxxx or pk_live_xxxxx

Path Parameters

id
string
required

Resource ID

Body

application/json
expires_in
integer
default:86400

Token expiration time (seconds). Default: 86400 (24 hours)

Response

200 - application/json

Success

token
string
expires_at
string<date-time>