# Create Token

> 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.

Source: /admin/accounts-funding/sessions/accounts-service_-profile-token-create

## `POST /trade/token`

**Create Token**

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.

Tags: `Sessions`

### Request body

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.

**Content-Type:** `application/json`

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.
- `profileId` (string)
- `expiresInSeconds` (string)


### Responses

#### `200` — A successful response.

**Content-Type:** `application/json`

Issued bearer token, in the same shape and with the same capability as a Client Login token.
access_token is the JWT to be passed as `Authorization: Bearer ...` to the Trader API.
expires_at is a Unix epoch (seconds) absolute expiry.
accounts lists the trading accounts the token covers, fixed when the token is issued —
accounts created later need a new token.
- `accessToken` (string)
- `expiresAt` (string)
- `accounts` (array)
  - items:
    Minimal (id, group_id) pair returned in the login response.
    - `id` (string)
    - `gId` (string)

#### `default` — An unexpected error response.

**Content-Type:** `application/json`

- `code` (integer)
- `message` (string)
- `details` (array)
  - items:
    - `@type` (string)

