auth/v1/token

Use the auth/v1/token endpoint to request an authorization token for the DT Offer Wall 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
{
    "grant_type": "client_credentials",
    "client_id": "3ce66d885XXXXXXXXXXa3b752bb9058",
    "client_secret": "YtMvC7VYTQMQ7w9UCUaFXXXJnwVZnQqqN02XNyt8IIh2h8XFDuXXXXXXXXSS6XTrFWW4TkebCcMLJkrXSw5IurkearTJIDzUxsbiMXv8hb4T23MwN6eE7DDIthRFqDnhnuhiDlY2oPeaOjsMbzE8joZ5cs6tsySJz6uZXwJ-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, you must specify client_credentials. The credentials are sent according to the OAuth 2.0 protocol.

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:

PARAMETER
TYPE
STATUS
DESCRIPTION

accessToken

string

Required

Access token required for Reporting API requests.

tokenType

string

Required

Type of token issued.

expiresIn

number

Required

Time, in seconds, for which the token is valid. All tokens expire one hour after a 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

400

unsupported_grant_type

Invalid grant_type. Always specify client_credentials.

400

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

invalid_client

This error occurs for the following reasons:

  • The requested credentials are not found.

  • The requested credentials are incorrect or cannot be recognized.

  • Your account is disabled.

  • Your credentials are revoked.

500

internal_server_error

Unexpected error on DT end.

Last updated