> ## Documentation Index
> Fetch the complete documentation index at: https://www.text.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Personal access tokens

> Use personal access tokens to authenticate requests to Text APIs. Learn how to create tokens, configure scopes, and send authorized API requests.

**Personal access tokens (PATs)** are the easiest way to access the Text APIs.

A PAT acts like a password for the API. Instead of logging in through the interface, your script uses this token to authenticate requests. Once created, the token can be reused in your API calls, which makes it possible to run integrations and automation without any other logins.

For most integrations, a personal access token is the simplest way to get started with the APIs.

## When to use personal access tokens

Use a personal access token whenever you want to connect your own scripts, tools, or services to the Text APIs. This applies to most API use cases, for example:

* **Automating tasks** – run scripts that export reports, retrieve chats, or update settings automatically.
* **Building internal tools** – create dashboards or utilities that help your team work with Text data.
* **Integrating with other systems** – send data to spreadsheets, analytics platforms, databases, or internal applications.
* **Testing and development** – quickly authenticate requests while exploring APIs in tools like Postman or curl.

Personal access tokens can be used to authenticate requests to the following APIs:

* [Agent Chat API (Web)](/api/agent-chat/)
* [Configuration API](/api/configuration/)
* [Reports API](/api/reports/)
* [Global Accounts API](/api/global-accounts/)
* [Ticketing API](/api/ticketing)
* [Customer Data Platform API](/api/customer-data-platform/)
* [Language detection API](/api/language-detection)

## How personal access tokens work

A personal access token always represents the account that created it. All API requests made with that token run using that account's permissions.

For example, if a token was created by an admin account, requests made with that token will run with that account's permissions, even if multiple users interact with the integration.

If your application needs to access the API on behalf of multiple users, use [OAuth authorization instead](/authentication/oauth-authorization). OAuth allows each user to authorize your application with their own account, so requests are executed using their identity and permissions.

## Creating a personal access token

<Steps>
  <Step title="Open Personal access tokens" noAnchor>
    Open Text and go to Settings → API access → [Personal access tokens](https://www.text.com/app/settings/integrations/api-access/personal-access-tokens). There, select **+ New token**.
  </Step>

  <Step title="Add the necessary scopes for your use case" noAnchor>
    Each API method requires specific [scopes](/authentication/scopes). You can find the required scopes in the method description for each API. Note that you won't be able to change those scopes after you create the token.

    <img className="block dark:hidden" alt="Creating a personal access token" src="https://mintcdn.com/text-56a1eab5/P-uL_OjomsnKKuul/public/images/access/create-pat-light.png?fit=max&auto=format&n=P-uL_OjomsnKKuul&q=85&s=6f45c7800d7c7bb5a9c9f3060035d352" width="1371" height="824" data-path="public/images/access/create-pat-light.png" />

    <img className="hidden dark:block" alt="Creating a personal access token" src="https://mintcdn.com/text-56a1eab5/P-uL_OjomsnKKuul/public/images/access/create-pat-dark.png?fit=max&auto=format&n=P-uL_OjomsnKKuul&q=85&s=e7ab9c34ac50b913f1c13fdc60ff6416" width="1470" height="843" data-path="public/images/access/create-pat-dark.png" />
  </Step>

  <Step title="Create your token" noAnchor>
    After creating the token, copy the following values:

    * the personal access token
    * your Account ID
    * the Base64 encoded token

    **Treat all this data like your personal password.** Do not expose it in any publicly available scripts.
  </Step>
</Steps>

To verify that your token is valid and has the right scopes, use the **Check token** option in Text under **Settings → API access → Personal access tokens**.

## Using the token in API requests

Personal access tokens use the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#Basic_authentication_scheme/" target="_blank">Basic authentication scheme</a>. Basic authentication requires a **username** and **password**. When using a personal access token:

* **Username** is your **Account ID**
* **Password** is your **personal access token**

When making a request in a tool like Postman, these two values are combined in the following format:

```shell theme={null}
<account_id>:<personal_access_token>
```

Postman automatically converts this value into a **Base64-encoded string** and includes it in the Authorization header of your request.

If you're making a request from another environment (for example using curl or a script), you need to encode the value yourself.

After creating your token, you'll also receive the Base64-encoded version of your Account ID and PAT, which you can use directly in the **Authorization header**:

```shell theme={null}
- H 'Authorization: Basic <base64_encoded_token>'
```
