api/v1/token

Use the ap1/v1/token endpoint to request an authorization token for the DT Growth Reporting API. Authorization tokens expire after one hour.

Host URL

https://reporting.digitalturbine.com

Method

POST

Endpoint

/auth/v1/token

Headers

Content-Type: application/json

Sample Authentication Request

 https://reporting.digitalturbine.com/auth/v1/token
{
        "grant_type": "client_credentials",
        "client_id": "3ce66d885XXXXXXXXXXa3b752bb9000",
        "client_secret": "YtMvC7VYTQMQ7w9UCUaFXXXJnwVZnQqq00000yt8IIh2h8XFDuXXXXXXXXSS6XTrFWW4TkebCcMLJkrXSw5IurkearTJIDzUxsbiMXv8hb4T23MwN6eE7DDIthRFqDnhnuhiDlY2oPeaOjsMbzE8joZ5cs6tsySJz6uZXwJ-x3lcYaYbgXXXXXXXX3_hFeuXm-C7-me2V1MMs-ftJxTd5QbHoUhG3Q5anCWCW_pg8x3CL4yPGCbpWUDZfpdNPyyCT4rxCEb-VC0Bdqwe8N2GGn_VSFOwQYxa-yap2JuNSGJfl_ZURXXXXXXXXFe1GpHDn8pk7yYwQYIGAg"
}
PARAMETER
TYPE
STATUS
DESCRIPTION

grant_type

string

Required

Type of credentials you are sending. When sending API Report credentials, specify client_credentials.

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 Responses

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

Successful Response

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

RESPONSE PARAMETER
TYPE
DESCRIPTION

accessToken

string

Access token required for Reporting API requests

tokenType

string

Type of token issued.

expiresIn

number

Time in seconds that the token is valid. All tokens expire one hour after successful token request.

Unsuccessful Response

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

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

HTTP STATUS CODE
ERROR
CAUSE

405 (Method_Not_Allowed)

N/A

The request method is not POST

400 (Bad_Request)

400 (Bad_Request)

Empty request body or incorrect Content-Type header

400 (Bad_Request)

invalid_request

This error occurs for the following reasons: - Error while parsing JSON request body - Missing grant_type parameter in the request - Missing or invalid client_id - Missing or invalid client_secret

400 (Bad_Request)

unsupported_grant_type

Invalid grant_type. Always specify client_credentials.

400 (Bad_Request)

invalid_client

This error occurs for the following reasons: - The requested credentials were not found - The requested credentials are incorrect or cannot be recognized - Your account has been disabled - Your credentials have been revoked

Last updated