Skip to main content
POST
/
v1
/
auth
/
ws-token
Issue a WebSocket token
curl --request POST \
  --url https://api.foresight.now/v1/auth/ws-token \
  --header 'Authorization: Bearer <token>'
{
  "token": "<string>",
  "expires_in": 60
}

Authorizations

Authorization
string
header
required

Privy-issued JWT. Required for L1 routes; accepted on L2 routes.

Response

Created

token
string

Single-use token. Pass as ?token= on the WS upgrade.

expires_in
integer

Seconds until the token expires.

Example:

60