> 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-offer-wall/reporting/reporting-api/auth-v1-token.md).

# auth/v1/token

Use the `auth/v1/token` endpoint to request an authorization token for the Offerwall Reporting API. Authorization tokens expire after one hour.

| **Host URL** | `https://reporting.fyber.com/`   |
| ------------ | -------------------------------- |
| **Method**   | `POST`                           |
| **Endpoint** | `/auth/v1/token`                 |
| **Headers**  | `Content-Type: application/json` |
| **Params**   | `format csv`                     |

## Sample Authentication Request

```
https://reporting.fyber.com/auth/v1/token
```

{% code overflow="wrap" %}

```json
{
    "grant_type": "client_credentials",
    "client_id": "3ce66d885XXXXXXXXXXa3b752bb9058",
    "client_secret": "YtMvC7VYTQMQ7w9UCUaFXXXJnwVZnQqqN02XNyt8IIh2h8XFDuXXXXXXXXSS6XTrFWW4TkebCcMLJkrXSw5IurkearTJIDzUxsbiMXv8hb4T23MwN6eE7DDIthRFqDnhnuhiDlY2oPeaOjsMbzE8joZ5cs6tsySJz6uZXwJ-x3lcYaYbgXXXXXXXX3_hFeuXm-C7-me2V1MMs-ftJxTd5QbHoUhG3Q5anCWCW_pg8x3CL4yPGCbpWUDZfpdNPyyCT4rxCEb-VC0Bdqwe8N2GGn_VSFOwQYxa-yap2JuNSGJfl_ZURXXXXXXXXFe1GpHDn8pk7yYwQYIGAg"
}
```

{% endcode %}

| PARAMETER       | TYPE   | STATUS   | DESCRIPTION                                                                                                                                                                                          |
| --------------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `grant_type`    | string | Required | <p>Type of credentials you are sending. When sending API Report credentials, you must specify <code>client\_credentials</code>.<br>The credentials are sent according to the OAuth 2.0 protocol.</p> |
| `client_id`     | string | Required | Your Reporting API ID that DT sends via encrypted email.                                                                                                                                             |
| `client_secret` | string | Required | Your Reporting API password that DT sends via encrypted email.                                                                                                                                       |

## Sample Authentication Response

The Reporting API responds to both successful and unsuccessful authentication token requests.

### Successful Response

When an authentication request is successful, you receive the following response in JSON format:

{% code overflow="wrap" %}

```json
{
    "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXXXJ9.eyJpYXQiOjE1NzAwMTY5MDAsImV4cCI6MTU3MDAyMDUwMCwiYXVkIjoic3BlZWRiYWxsIiwic3ViIjoiMjEwMjYzIn0.hDo1waTytSys_oRhFNUPqZPom26bL05rxgtSt3XYHqI",
    "tokenType": "bearer",
    "expiresIn": 3600
}
```

{% endcode %}

| PARAMETER     | TYPE   | STATUS   | DESCRIPTION                                                                                                            |
| ------------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------- |
| `accessToken` | string | Required | Access token required for Reporting API requests.                                                                      |
| `tokenType`   | string | Required | Type of token issued.                                                                                                  |
| `expiresIn`   | number | Required | <p>Time, in seconds, for which the token is valid.<br>All tokens expire one hour after a successful token request.</p> |

### Unsuccessful Response

When a token request is unsuccessful, the Reporting API returns the following response:

{% code title="JSON" %}

```json
{
    "error": "internal_server_error"
}
```

{% endcode %}

The following table provides possible errors that result in an unsuccessful response.

| HTTP STATUS CODE | ERROR                    | CAUSE                                                                                                                                                                                                                                                                                      |
| ---------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 400              | unsupported\_grant\_type | Invalid `grant_type`. Always specify `client_credentials`.                                                                                                                                                                                                                                 |
| 400              | invalid\_request         | <p>This error occurs for the following reasons:</p><ul><li>Error while parsing JSON request body.</li><li>Missing <code>grant\_type</code> parameter in the request.</li><li>Missing or invalid <code>client\_id</code>.</li><li>Missing or invalid <code>client\_secret</code>.</li></ul> |
| 400              | invalid\_client          | <p>This error occurs for the following reasons:</p><ul><li>The requested credentials are not found.</li><li>The requested credentials are incorrect or cannot be recognized.</li><li>Your account is disabled.</li><li>Your credentials are revoked.</li></ul>                             |
| 500              | internal\_server\_error  | Unexpected error on DT end.                                                                                                                                                                                                                                                                |


---

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.digitalturbine.com/dt-offer-wall/reporting/reporting-api/auth-v1-token.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
