> For the complete documentation index, see [llms.txt](https://docs.digitalturbine.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digitalturbine.com/dt-exchange/getting-started-with-dt-exchange/advanced-configurations/dt-exchange-management-api/authentication.md).

# Authentication

DT's API endpoints are secured, and must be used with an authentication token.

The first step is to obtain an authorization header for authentication. This enables you to use the Management API and be verified as a user within the Console.

Generating your verification keys:

1. Click your login user name in the top-left corner.

<div align="left" data-with-frame="true"><figure><img src="/files/pdIKrNcCASlKYKRqyw21" alt="" width="228"><figcaption></figcaption></figure></div>

2. Click **User Profile** to open the User Profile Window.

<div align="left" data-with-frame="true"><figure><img src="/files/EORvAtVYRB6hxi2twtNB" alt=""><figcaption></figcaption></figure></div>

3. In the `Management API - Credentials` section, the **Client ID** and **Client Secret** Keys are displayed.

## Generate New Keys

You should generate new verification keys on a regular basis. In order to generate new keys, you must first revoke the current keys.

**To generate new verification keys:**

1. Log in to the [DT Console](https://console.fyber.com/), and click your user name in the left-hand menu.
2. Click **User Profile**.
3. For the verification keys you want to re-generate, click **Revoke**.

<div align="left" data-with-frame="true"><img src="/files/7NG2ySlK8OBq7xZ6gsdw" alt=""></div>

4. Click **Generate New Keys**. The keys you have generated must now be placed in the Endpoint to generate your Access Token to the Management API.

### Generating Your Access Token

Copy both the Client ID and Client Secret keys and create an HTTP request with the following body.

**Description**

Use the UI Management API credentials to authenticate your user and get back an access token to authorize further requests.

**Method**

`POST https://console.fyber.com/api/v2/management/auth`

### Request Parameters

| Key            | Description                                                                                                      | Type   | Required | Example                                      |
| -------------- | ---------------------------------------------------------------------------------------------------------------- | ------ | -------- | -------------------------------------------- |
| grant\_type    | <p>This key is constant and should always be completed for this API as "management\_client<br>\_credentials"</p> | String | Required | <p>"management\_client\_<br>credentials"</p> |
| client\_id     | The Client ID token from the UI received for authentication.                                                     | String | Required | <p>“677eXXXXXXcdcc3fd790<br>deb46duyud4”</p> |
| client\_secret | The Client Secret token from the UI received for authentication.                                                 | String | Required | “ghhjhiGHXXXXXX87686"                        |

### Example Request

```json
 {
   "grant_type": "management_client_credentials",
   "client_id": "677e6543049XXXXXXXXX0deb46d2ecd4",
   "client_secret": "d0iSLq5y6XXXXXuOyM4blm8GwzQb2sLOlcBtsI9KvBx9tGuucM2kvrdxXXXXXPjIunXbATQTkHDjHvVEVv1JgXFj0EUWmuNpNH53p9SnGWxwXXXXgdJSkCUDuHaDeFWHz-prMEGftXXXXXXfa_-8mRZURDZu2d_CRnwZ-Z51EnuFszgEP04f1AjcKTVhNSw0rXXXXXXdKaGZNM4EPsV5SxLBZKKdQxa3PPWL1Cb56U9ftviXPJKU47nAzXXXXXXXdfXKBsMCG2FX3nB7E2Eib_yHNK0EtXX4zFTr8uYRXXXXXXXCLMVRUxNjQ" 
 }
```

### Response Parameters

| Key         | Description                                                                | Type   | Required | Example                                                                                                                                                                              |
| ----------- | -------------------------------------------------------------------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| accessToken | Token to be used to authorize future requests                              | String | Required | <p>“eyJhbGciXXXXXXXXsInR5cCI6IkpXVC<br>J9.eyJpYXQiOjE2Mjg2NzI4OTMsImV4c<br>CI6MTYyODXXXXXXwiYXVkIjoibWFu<br>YWdlbWVudEFXXXXN1YiI6IjM2MiJ9.<br>cjx3AgYcI0XXXXYkVsO6F\_7M72lu\_p ”</p> |
| tokenType   | Only bearer token type is available                                        | String | Required | “bearer”                                                                                                                                                                             |
| expiresIn   | The number of seconds for which the token is valid (3600 seconds = 1 hour) | String | Required | 3600                                                                                                                                                                                 |

### Example Response

```json
{
  "accessToken": "eyJhbGciXXXXXiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE2Mjg2NzI4OTMsIXXXXXXXODY3NjQ5MywiYXfdheibWFuYWdlbWVuXXXXXXXnN1YiI6IjM2MiJ9.cjx3AgYcI0w5qG0YkVsO6F_7M72lu_pqSqtXXXXXU",
  "tokenType": "bearer",
  "expiresIn": 3600
}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digitalturbine.com/dt-exchange/getting-started-with-dt-exchange/advanced-configurations/dt-exchange-management-api/authentication.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
