# Entity Auth Token (Deprecated)

### Environment

<table><thead><tr><th width="218">Environment</th><th>Token Service (OLD) Base URL</th></tr></thead><tbody><tr><td>Saafe Hackathon</td><td><code>https://tokens.sandbox.sahamati.org.in</code></td></tr><tr><td>Saafe Sandbox</td><td><code>https://uattokens.sahamati.org.in</code></td></tr></tbody></table>

### API Request

<mark style="color:green;">`POST`</mark> `{{Token Service Base URL}}/auth/realms/sahamati/protocol/openid-connect/token`

#### Request <a href="#request" id="request"></a>

**Authorization Basic Auth**

<table data-header-hidden><thead><tr><th width="254"></th><th></th></tr></thead><tbody><tr><td>Username</td><td>client id - Obtained in <a href="/pages/P8RZNuk6Kz2oSMi8iHkN">Create FIU Entity</a></td></tr><tr><td>Password</td><td>client secret - Obtained in <a href="/pages/P8RZNuk6Kz2oSMi8iHkN">Create FIU Entity</a></td></tr></tbody></table>

**Body**

| **Key**     | **Value**           |
| ----------- | ------------------- |
| grant\_type | client\_credentials |
| scope       | openid              |

#### Response <a href="#response" id="response"></a>

```json
{
    "access_token": "string",
    "expires_in": 86400,
    "refresh_expires_in": 0,
    "token_type": "Bearer",
    "id_token": "string",
    "not-before-policy": 0,
    "scope": "openid email microprofile-jwt profile address phone offline_access"
}
```

**Note:** **access\_token** in the above response needs to be used as **client\_api\_key** in the header of the API calls made to the AA


---

# 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.saafe.in/central-registry/entity-auth-token-deprecated.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.
