New: Stripe & TossPayments integration guides now available →
cURL
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" }
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.
API Key. Example: sk_live_xxxxx or pk_live_xxxxx
Resource ID
Token expiration time (seconds). Default: 86400 (24 hours)
성공