Manage personal tokens
Create and delete personal tokens from Azion Console or the Azion CLI, and store the token value when you create it.
You can create and delete a personal token from Azion Console or with the Azion CLI. A personal token authenticates your requests to the Azion API and the commands you run in the CLI. To revoke a token, delete it.
Select the interface you use. The prerequisites and each procedure on this page follow that choice.
Prerequisites
- An Azion account. To create one, refer to Create an account.
- Access to Azion Console. To sign in, refer to How to access Azion Console.
Create a personal token
Each personal token has a name, an optional description, and an expiration. Azion shows the token value only when the token is created, so store it before you continue.
To create a personal token with the Azion CLI, pass a name, an expiration, and an optional description. This command creates a token named my-token that expires the next day:
The command prints the token value:
The --expiration flag takes a number followed by d for days or m for months, such as 1d or 9m. No other personal-token command prints the value. To create the token from a JSON file with the name, expires_at, and description keys, refer to Azion CLI personal-token.
Delete a personal token
Deleting a personal token revokes it, and the deletion cannot be undone. Azion Console asks you to confirm the deletion with the token name, and the Azion CLI takes the token UUID.
The Azion CLI deletes a personal token by its UUID. To find the UUID, list your personal tokens:
The command prints the UUID, the name, and the expiration of each token, never its value:
A token past its expiration, such as old-token, stays in the list until you delete it.
To delete the token, pass its UUID in --id. This command deletes the token named my-token:
The command deletes the token without asking for confirmation, and prints: