Skip to main content
POST
/
extension
/
exchange
cURL
curl --request POST \
  --url https://api.useanima.sh/v1/extension/exchange \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "code": "<string>"
}
'
{
  "token": "<string>",
  "signingSecret": "<string>",
  "orgId": "<string>",
  "expiresAt": "2023-11-07T05:31:56Z",
  "requiresApproval": true
}

Authorizations

Authorization
string
header
required

JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer

Body

application/json

Request body for exchanging a code for extension credentials

code
string
required

One-time exchange code from createToken

Minimum string length: 1

Response

200 - application/json

OK

Extension credentials returned after code exchange

token
string
required

Extension auth token (API key) for the browser extension

signingSecret
string
required

HMAC signing secret for WebSocket bridge messages

orgId
string
required

Organization ID for channel subscription

expiresAt
string<date-time> | null
required

ISO 8601 expiration time. Null for session-based.

requiresApproval
boolean
required

Whether the owner must approve this token in the extension UI