Skip to main content
POST
/
token
Create a session token
curl --request POST \
  --url https://api.deck.co/v2/token \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "object": "<string>",
  "token": "<string>",
  "expires_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "request_id": "<string>"
}

Authorizations

Authorization
string
header
required

Secret key (sk_live_...)

Response

Created

A session token for the Auth Component. Short-lived (30 minutes) and scoped to a single component session.

id
string
required

Unique identifier for the session token, prefixed with tok_.

object
string
required

Always token.

token
string
required

The token value to pass to <DeckAuthComponent />. Prefixed with tk_. Treat as a bearer secret until it expires.

expires_at
string<date-time>
required

ISO 8601 timestamp at which the token stops being accepted. 30 minutes after created_at.

created_at
string<date-time>
required

ISO 8601 timestamp of when the token was created.

request_id
string
required

Unique identifier for the API request. Include this when contacting support.