# Get Token

{% hint style="danger" %}
To access some **Sirdata's APIs**, you **must** generate an **authentication token.**
{% endhint %}

## Get Token

<mark style="color:blue;">`GET`</mark> `https://partner-api.sddan.com/api/v1/public/auth/partner/:id/token`

Have a look of the JSON Body **Request** and **Response**

#### Path Parameters

| Name | Type   | Description               |
| ---- | ------ | ------------------------- |
| id   | string | Your Sirdata's partner id |

#### Request Body

| Name     | Type   | Description                                            |
| -------- | ------ | ------------------------------------------------------ |
| login    | string | The user's login requesting the authentification token |
| password | string | The user's password                                    |

{% tabs %}
{% tab title="200 Example response for a valid Token creation" %}

```
{
  "token": "-njtsdfsjookdbyekkcuzoldsrl",
  "partner_id": 12345,
  "expiration_time": "2019-12-11T17:52:30.821624721+01:00"
}
```

{% endtab %}

{% tab title="400 Invalid input request" %}

```
```

{% endtab %}

{% tab title="401 Unauthorized access" %}

```
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Partner id**

Please note that your **partner id** refered as **id** into the *Path Parameters* (see below) will be provided by your Sirdata's technical AM once **API Access** has been granted.
{% endhint %}

{% hint style="success" %}
**Authentification Token created**&#x20;

Once you generate the **authentication token**, we are ready to request Sirdata's APIs. \
Include the token from the **JSON response** as a **header** in all other API calls.&#x20;

Below is an example of a **header** that includes the token used to make subsequent API call.
{% endhint %}

```
Authorization: -njtsdfsjookdbyekkcuzoldsrl
```

{% hint style="warning" %}
Please note that both **legal** and **sales agreements** must be signed prior, otherwise the **authentification token** won't allow access.

You can refer to the [**API Access**](/api-overview/api-access.md) section for more information.
{% endhint %}

{% content-ref url="/pages/-LyUGDqo2EVCjsRokWQd" %}
[API Access](/api-overview/api-access.md)
{% endcontent-ref %}


---

# 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.sirdata.net/authentification/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.
