# How to manage a personal token

import Tabs from '~/components/tabs/Tabs'


[Personal Tokens](/en/documentation/products/accounts/personal-tokens/) allow you to authenticate your access to interfaces and tools such as the [Azion CLI](/en/documentation/products/build/develop-with-azion/cli/) and [Azion API](/en/documentation/products/overview-azion-api/). 

---

## Creating a personal token

<Tabs client:visible>
    <Fragment slot="tab.console">Console</Fragment>
    <Fragment slot="tab.api">API</Fragment>

<Fragment slot="panel.console">
1. Log in to [Azion Console](https://console.azion.com).
2. In the **Account Menu** on the top-right corner, represented by three horizontal lines, and select **Personal Tokens**.
3. Click the **+ Personal Token** button.
4. Fill in the required fields:

   - **Name**
   - **Description** (optional)
   - **Expires within**
      - You can choose the token expiration date between 1, 7, 15, 30, 90 days, 1 year, or a custom date.

5. Click the **Save** button.
6. In the pop-up, click the **visibility** icon in the **Personal Token** field to see your token.
7. Click the **Copy** button to copy your token.

:::note
You can only see your token when you first create it.
:::
</Fragment>

<Fragment slot="panel.api">
1. Run the following cURL command in your terminal, replacing `[TOKEN VALUE]` with an already existing personal token:

```bash
curl --location 'https://api.azionapi.net/iam/personal_tokens' \
--header 'Accept: application/json; version=3' \
--header 'Authorization: Token [TOKEN VALUE]' \
--header 'Content-Type: application/json' \
--data '{   
    "name": "One day token",
    "expires_at": "2023-07-26T00:00",
    "description": "example"
}'
```

You can also change the `name`, `expires_at`, and `description` fields.

:::tip
Check the [Azion API documentation](https://api.azion.com/) and the [OpenAPI specification](https://github.com/aziontech/azionapi-openapi/) to know more about all features available via API.
:::
</Fragment>

</Tabs>

---

## Revoking a personal token

To revoke your **Personal Token**, proceed as follows:

1. Log in to [Azion Console](https://console.azion.com).
2. In the **Account Menu** on the top-right corner, represented by three horizontal lines, and select **Personal Tokens**.
3. On the **Personal Tokens** page, click the three points icon on the right corner of the personal token you want to delete.
4. When you click the icon, select **Delete** and a message will appear asking you to confirm the deletion.
5. On the verification pop-up, type **delete**.
6. Click the **Delete** button.

You'll see a message confirming the deletion of your token.

Watch a video tutorial on how to manage a personal token on Azion's YouTube channel:

<Video src="https://www.youtube.com/embed/HOkuSudhKfE" title="How to manage a personal token" description="Find out how to use Personal Tokens on Azion." uploadDate="2023-10-17" />