Custom Domain
API referenceTokens

Exchange application credentials for a short-lived widget JWT

POST
/tokens

Server-side only. Trade an application's client_secret for a short-lived widget JWT the browser can use on the Connect endpoints. Never ship the client_secret or an API key to the browser.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/tokens" \  -H "Content-Type: application/json" \  -d '{    "application_id": "string",    "client_secret": "string"  }'
{  "token": "string",  "token_type": "Bearer",  "expires_in": 0}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}