# How-To: Modify User Access Token Setting

After creating a User Access Token, you can update its parameters to reflect new requirements. This includes modifying its **name**, **note**, **expiration date**, **status**, and **model assignment**.

**Note**: Workload assignment is only possible for tokens that are not currently assigned to any model. To reassign a token, you must first remove the existing assignment, making the token unassigned, and then assign it to the desired model.

This guide provides instructions for making these changes using the **web console** and the **Python SDK**.

***

### Parameters that may be modified

| Field          | Description                                                               | Is this information accessible to end-users or it is restricted to system providers only | Allowed Values                    |
| -------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | --------------------------------- |
| name           | New name for the token.                                                   | End-user can see the info                                                                | Any non-empty string              |
| note           | Updated note for additional context.                                      | The info is restricted to AI providers                                                   | Any string, or none at all        |
| expriationDate | Set a new expiration date within the allowed range.                       | End-user can see the info                                                                | Valid Unix timestamp (BigInt)     |
| status         | Update the token's status (`active` or `cancelled`).                      | End-user can see the info                                                                | `ACTIVE`, `CANCELED`, `SUSPENDED` |
| modelId        | Assign the token to a model. This is only possible for unassigned tokens. | Users can view the name associated with a model by providing its model ID                | Valid `modelId` string or `None`  |

***

{% tabs %}
{% tab title="🌐Console" %}
Follow these steps to modify token parameters through the web console:

<figure><img src="/files/Xmf0ltrF8RjEdYVF4owX" alt=""><figcaption></figcaption></figure>

1. **Navigate to the Tokens Page**\
   Log in to the web console and go to the **Tokens** section. Use the filters or sorting options to locate the token you want to modify.
2. **Access the Edit Options**
   * Click the **three dots** button next to the token you want to modify.
   * Select the **Edit** option from the dropdown menu.
3. **Modify the Parameters**\
   In the edit window, you can update the following:
   * **Name**: Update the descriptive name of the token.
   * **Note**: Add or change the note for the token.
   * **Expiration Date**: Adjust the token's expiration date within the allowed limits.
   * **Status**: Activate or cancel the token.
   * **Model Assignment**: If the token is unassigned, you can assign it to a model.
4. **Delete the Token** \
   If the token is no longer needed, select the **Delete** option from the dropdown menu to remove it.
5. **Save Changes**\
   Click **Update Token** to save your changes. The token’s updated details will appear in the token list.
   {% endtab %}

{% tab title="🧊Python SDK" %}
Use the following code snippet to modify token parameters programmatically:

```python
# Update Token
import LatticaManagement

# Authenticate
lattica = LatticaManagement("your_license_from_lattica_console")

# Get a token_id...
token_id = lattica.list_tokens()[0].token_id

# Update the token's attributes
lattica.update_token(token_id, status="CANCELED")

# Alternative 1:
# Cancel token
lattica.cancel_token(token_id)
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://platformdocs.lattica.ai/how-to-guides/access-control/how-to-modify-user-access-token-setting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
