--- title: "Manage Rocket Chat Personal Access Tokens" slug: "manage-personal-access-tokens" description: "Learn how to manage personal access tokens in Rocket Chat. Ensure secure API access and collaboration controls." updated: 2026-07-13T17:25:06Z published: 2026-07-13T17:25:06Z canonical: "docs.rocket.chat/manage-personal-access-tokens" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Manage Personal Access Tokens To make API calls easily and securely, you can create personalized access tokens. Unlike typical authentication tokens, personal access tokens have no expiration duration. To access this setting, click your account profile icon and select **Profile** > **Personal Access Tokens**. ## Create a personal access token To create a personal access token, 1. From the Personal Access Token setting, enter the token name. 2. From the Two Factor Authentication drop-down, choose how the token handles endpoints that require 2FA: 1. **Require Two Factor Authentication**: The token must be used with a valid 2FA code for endpoints that require 2FA. 2. **Ignore Two Factor Authenticatio**n: The token can be used without any 2FA code for endpoints that require 2FA. 3. Click **Add**. 4. Enter your password or 2FA code to **Verify**. (This is applicable if [2FA](/v1/docs/two-factor-authentication-configuration) has been enabled for your workspace.) 5. Your access token is generated successfully. It displays your user ID and the access token. The following screenshot shows an example: ![](https://cdn.us.document360.io/6ae79a05-7252-45d0-96e8-8f375e07b1b2/Images/Documentation/image-1750311533989.png) > [!NOTE] > - Remember to save the user ID and access token in a safe place as you can only view it once. > - You can also generate tokens using the endpoint: [Generate Personal Access Token](https://developer.rocket.chat/apidocs/generate-personal-access-token) ## Delete personal access token To delete an access token, - From the Personal Access Token list, click the **Delete** icon against the token you choose to delete. - Then, click **Delete**. ## Regenerate personal access token To regenerate an existing access token, - From the Personal Access Token list, click the refresh icon against the token you choose to regenerate. - Then, click **Regenerate**. Remember to update all applications that use the old value and replace it with the regenerated token. ## How to use personal access tokens When calling any endpoint that requires user authentication, you must provide two headers: `x-User-Id` and `x-Auth-Token`. Enter the personal access token as the `x-Auth-Token` value. With this, you can maintain a long-term connection. See the [Authentication API](https://developer.rocket.chat/apidocs/authentication-api) for details. ### Using personal access tokens with 2FA If your workspace has [2FA configured](/v1/docs/two-factor-authentication-configuration), follow these steps to call an endpoint that requires 2FA: 1. For the `x-Auth-Token` header field, enter a personal access token generated with the **Require Two Factor Authentication** option. 2. You will need to add two additional headers: `x-2fa-method` and `x-2fa-code`. You don’t need to provide both, you can provide the `x-2fa-code` only. See the [Two-Factor Authentication API](https://developer.rocket.chat/apidocs/two-factor-authentication-api) for details. ### Using personal access tokens without 2FA If your workspace has 2FA configured, you may want to bypass the need for additional authentication every time you call an endpoint that requires 2FA. 1. For the `x-Auth-Token` header field, enter a personal access token generated with the **Ignore Two Factor Authentication** option. 2. Now, you don’t need to add the additional 2FA headers, and you can maintain a connection via the personal access token. > [!NOTE] > - If your workspace does not have 2FA enabled, the endpoints do not require 2FA headers. Call the endpoint using the user ID and token as usual. > - If your workspace has 2FA configured, you can receive a 2FA code via email, use an authenticator app, or enter your password. Check with your workspace administrator if you are not sure about the 2FA method. ## Troubleshooting **Personal access tokens are removed automatically** Personal access tokens have no expiration duration. However, they can be deleted automatically in any of the following cases: - An admin [deactivates the user](/v1/docs/manage-workspace-users#deactivate-and-delete-user). - An admin resets the user’s 2FA [TOTP](/v1/docs/manage-workspace-users#reset-user-totp) or the [E2EE key](/v1/docs/manage-workspace-users#reset-user-e2ee-key). - An admin logs the user out of a device. In these cases, the user’s personal access tokens are deleted and must be created again. Watch the video below for a demonstration on how to create and use personal access tokens: [Embedded content](https://www.youtube.com/embed/8Xk0m7E4Y3E)