# Generate Access Token

{% 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/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="/files/YQfofiBhcNJUZLmvTJXg" 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="/files/kUJ2vXECUwA3qPCwGTfJ" 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 %}


---

# 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://docs.truecaller.com/truecaller-for-business/verified-business-api-documentation/getting-started/generate-access-token.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.
