API Authentication
Authenticate your API requests with the Tapjoy Offerwall API to manage campaign data and performance.
Read time 2 minutesLast updated 14 days ago
Requesting access
Requests are authenticated using a standard two-legged OAuth2 flow: an is requested using an encoded API Key, and the resulting is used to authenticate against future requests.
access_tokenaccess_tokenAs an Advertiser, you can find this key in the Ad dashboard.

Access tokens have a 1-hour lifetime and can't be refreshed. When a token expires you must request a new one with your Reporting API Key/Marketing API Key.
To request an access token you must send a POST request with an Authorization header using your API Key. If the credentials are valid the response will include an access token and the number of seconds until the token expires.
Example access requests
Refer to the following example API key requests.
The following example shows the required headers for a token request.
POST /v1/oauth2/token Host: api.tapjoy.com Authorization: Basic <API Key> Accept: application/json
Request responses
Refer to the following request responses.
A successful request returns a 200 status with an access token and its expiry duration in seconds. For example:
status 200 { "access_token": "token_string", "token_type": "bearer", "expires_in": 3600, "refresh_token": null }
Using the access token
When you have an , you can make requests to the API. Send the in the Authorization header of every request:
access_tokenaccess_tokenAuthorization: Bearer <token_string>
If the is missing or expired, the API returns a 401 Unauthorized status.
access_tokenFor a full example of retrieving reporting data with your token, refer to Reporting API for advertisers.
To authenticate a request from end to end, follow these steps:
- Send the Offerwall dashboard API key as .
Authorization: Basic <API Key> - Request to exchange your API key for an
POST /v1/oauth2/token.access_token - Use the header to authenticate requests.
Authorization: Bearer <token_string> - Send your authenticated queries to the endpoint.
POST https://api.tapjoy.com/graphql
Example request and response
Refer to the following example authentication API request and missing token response.
The following example shows the required headers for an authenticated API request.
POST /v4/audiences Host: api.tapjoy.com Authorization: Bearer <token_string> Accept: application/json