--- title: "apitoken create" slug: "apitoken-create" tags: ["5.5"] updated: 2026-10-27T23:00:54Z published: 2026-10-27T23:00:54Z canonical: "docs.vastdata.com/apitoken-create" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.vastdata.com/llms.txt > Use this file to discover all available pages before exploring further. # apitoken create This command creates an API token, which can be used to securely authenticate calls to the VMS REST API. The token is displayed in the command output and cannot be displayed again. The number of tokens per user is limited to five by default and configurable using [vms set_max_api_tokens_per_user](/docs-5-5/docs/vms-set-max-api-tokens-per-user). The command enables you to create a token for yourself or for another user. > [!NOTE] > Note > > Creating a token for another user requires *Create* permission for the *Security* realm. ## Usage ```plaintext apitoken create [--name TOKEN_NAME]                [--expiry-date EXPIRATION_TIME]                [--owner OWNER] ``` ## Options | `--name TOKEN_NAME` | Customizes the name of the API token. If not specified, the token is named `OWNER_api_token`, where OWNER is the user name of the token owner. | | --- | --- | | `--expiry-date EXPIRATION_TIME` | Sets the token's expiration date by specifying an amount of time from token creation until the token should expire. The expiration date is equal to the token creation date in UTC + the specified time period. Specify `EXPIRATION_TIME` as a whole integer followed by a unit of time: 'Y' for (365 day) years, 'M' for (30 day) months, 'w' or 'W' for weeks, 'd' or 'D' for days, 'h' or 'H' for hours, 'm' for minutes, 's' or 'S' for seconds. The maximum and default expiration time is the password expiration timeout, which is set by the `--pwd-expiration-timeout` parameter of the [vms modify_pwd_settings](/docs-5-5/docs/vms-modify-pwd-settings) command. If password expiration is not enabled, tokens do not expire unless `--expiry-date` is set. Example: To set the token to expire after 180 days: `--expiry-date 180D` | | `--owner OWNER` | Sets the owner of the token. Use this parameter to create a token for another user. If not specified, the token is owned by the requesting user. > [!NOTE] > Note > > Creating a token for another user requires *Create* permission for the *Security* realm. | ## Examples This example creates a token for the `admin` user, named `admin_api_token`: ```plaintext vcli: admin> apitoken create ApiToken with id: JhxND7ci has been created, your token is: JhxND7ci.AWrRmHXRtbcjUSCANl9KLrxRT6sMqesu please keep it safe ``` This example creates a token for the user `admin_jb`, named `AWS_TOKEN` that will expire in one day: ```plaintext vcli: admin> apitoken create --name AWS_TOKEN --expiry-date 1D --owner adminjb ApiToken with id: L7k8ljIC has been created, your token is: L7k8ljIC.jm1P5Y0ONaJfUJhslJbAjRAyr9jcy89X please keep it safe ```