# Create

Launch stage: GA

`POST /api/2.0/token/create`

Creates and returns a token for a user. If this call is made through token authentication, it creates
 a token with the same client ID as the authenticated token. If the user's token quota is exceeded, this call
 returns an error **QUOTA_EXCEEDED**.

API scopes: authentication

## Request body

- `lifetime_seconds` (int64, optional)
  The lifetime of the token, in seconds.
  
   If the lifetime is not specified, this token remains valid for 2 years.
- `comment` (string, optional)
  Optional description to attach to the token.
- `scopes` (array of string, optional)
  Optional scopes of the token.

## Returns

- `token_value` (string, optional)
  The value of the new token.
- `token_info` (object, optional)
  The information for the new token.
  - `token_id` (string, optional)
    The ID of this token.
  - `creation_time` (int64, optional)
    Server time (in epoch milliseconds) when the token was created.
  - `expiry_time` (int64, optional)
    Server time (in epoch milliseconds) when the token will expire, or -1 if not applicable.
  - `comment` (string, optional)
    Comment the token was created with, if applicable.
  - `scopes` (array of string, optional)
    Scope of the token was created with, if applicable.

## Response

```json
{
  "token_value": "string",
  "token_info": {
    "token_id": "string",
    "creation_time": 0,
    "expiry_time": 0,
    "comment": "string",
    "scopes": [
      "string"
    ]
  }
}
```

