Developer Portal

Create TokenPOST

Issue an end-user access token for a client profile without its password, for CRM 'log in as client' handoffs. The token grants the same trading access as Client Login; expiresInSeconds bounds its lifetime and 0 defaults to 30 days. It cannot be revoked once issued, so prefer the shortest lifetime that works. Requires the 'clients-profile:token' permission.

View as Markdown
POST
/trade/token

Authorization

Authorization<token>

Bearer access token issued by the admin login flow.

In: header

Request Body

application/jsonRequired

Request for an access token issued on a profile's behalf, without its password. profile_id is the client profile the token will act as. expires_in_seconds is the lifetime from now; 0 defaults to 30 days.

profileIdstring
expiresInSeconds0 defaults to 30 days
Format: "uint64"
curl -X POST "https://example.com/trade/token" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "profileId": "string",
    "expiresInSeconds": "string"
  }'

A successful response.

{
  "accessToken": "string",
  "expiresAt": "string",
  "accounts": [
    {
      "id": "string",
      "gId": "string"
    }
  ]
}