# Entity Auth Token

### Environment

<table><thead><tr><th width="218">Environment</th><th>IAM Base URL</th></tr></thead><tbody><tr><td>Saafe Hackathon</td><td><code>https://api.sandbox.sahamati.org.in/iam</code></td></tr><tr><td>Saafe Sandbox</td><td><code>https://api.uat.sahamati.org.in/iam</code></td></tr></tbody></table>

### API Request

<mark style="color:green;">`POST`</mark> `{{IAM Base URL}}/v1/entity/token/generate`

User Token is used to access the IAM user APIs

**Headers**

| Name         | Value                               |
| ------------ | ----------------------------------- |
| Content-Type | `application/x-www-form-urlencoded` |

**Body**

| Key    | Value  | Description       |
| ------ | ------ | ----------------- |
| id     | string | FIU Entity ID     |
| secret | string | FIU Entity Secret |

**Response**

{% tabs %}
{% tab title="200" %}
{% code overflow="wrap" %}

```json
{
    "ver": "1.0.0",
    "timestamp": "2024-10-10T11:11:45.096203206Z",
    "txnId": "6dc871b0-cc81-4437-9286-28e317f0afaa",
    "accessToken": "JWT Token",
    "expiresIn": 86400,
    "refreshExpiresIn": 0,
    "tokenType": "Bearer",
    "notBeforePolicy": 0,
    "scope": "email microprofile-jwt profile address phone offline_access"
}
```

{% endcode %}
{% endtab %}
{% endtabs %}
