> For the complete documentation index, see [llms.txt](https://docs.truecaller.com/truecaller-for-business/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.truecaller.com/truecaller-for-business/truecaller-for-business/verified-business-api-documentation/getting-started/generate-access-token.md).

# Generate Access Token

This API is used to generate an access token using the Key ID and Secret API Key created from the Manage API Keys page

{% hint style="warning" %}
A maximum of 10 tokens can be created every 30 minutes.\
Validity of the auth token is 60min ,post that we need to recall the API for fresh auth token value.
{% endhint %}

{% hint style="success" %}
Replace the `{{BaseURL}}` with the one mentioned [here ](/truecaller-for-business/truecaller-for-business/verified-business-api-documentation/getting-started.md)
{% endhint %}

<mark style="color:green;">`POST`</mark> `{{BaseURL}/clients/{clientAccountId}/token`

{% hint style="success" %}
{clientAccountId} : This can be taken directly from the self serve portal under the Manage API Keys Page&#x20;
{% endhint %}

<figure><img src="https://1257250529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpyyDYzpD4A2zU6fYohHS%2Fuploads%2F7PbKuiwH8ArBUuHlsLrc%2Fclientaccountid.gif?alt=media&amp;token=18613b6a-5e81-4527-a5bb-f8c4e54a2d57" alt=""><figcaption></figcaption></figure>

**Headers**

| Name            | Value | Description |
| --------------- | ----- | ----------- |
| X-Public-Access | allow | Required    |

**Body**

| Name     | Type   | Description                                              |
| -------- | ------ | -------------------------------------------------------- |
| api\_key | string | <p>Required<br>API key from the Manage API Keys Page</p> |
| key\_id  | string | <p>Required<br>Key ID from the Manage API Keys Page</p>  |

<figure><img src="https://1257250529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpyyDYzpD4A2zU6fYohHS%2Fuploads%2FHfPjFxGDBCusbkEJjjoF%2FNewkeyid.gif?alt=media&amp;token=dbf29055-fc78-4177-a699-ce5432603ea3" alt=""><figcaption></figcaption></figure>

#### Request

{% tabs %}
{% tab title="JSON" %}

<pre class="language-json"><code class="lang-json">{
<strong>    "key_id": "aaaee1b1-7a2f-4c0b-8271-4e2b41c1bf01",
</strong>    "api_key": "caf1694e-b8a4-4082-82fc-105a0a63eafe"
}
</code></pre>

{% endtab %}
{% endtabs %}

**Response**

{% tabs %}
{% tab title="200 OK" %}

```json
{
    "token": "a4p0pZ2x3aEk9TYGxPZldm0qvWQknTXTINPZxNpIZ32yWmiOFtGqv2mEU7nJlQO6",
    "created_at": "2025-07-10T06:59:05.72Z"
}
```

{% endtab %}

{% tab title="400 Bad Request" %}

```json
{
    "slug": "invalid-input",
    "message": "api_key is required"
}
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
API keys are now mapped to the **account/service-account** rather than an **individual user**. \
As a one-time activity, customers using **API integrations** are advised to regenerate their API keys and update the new keys in their application configuration to ensure uninterrupted service. \
All API keys generated after this change are mapped to the **service account** and are no longer dependent on the **individual user** who generated them.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.truecaller.com/truecaller-for-business/truecaller-for-business/verified-business-api-documentation/getting-started/generate-access-token.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
