Documentation

​
​

Development

User Acquisition

Monetization

Industry

Unity Offerwall

Offerwall Android SDK

Offerwall iOS SDK

Offerwall Unity SDK

Unity Offerwall

Tapjoy Offerwall
​
​
Dashboard
  • CPE campaigns
  • Deferred deeplinks
  • Payment security
ROAS optimization
  • ROAS optimization
  • Introduction to ROAS optimization
  • Get started with ROAS optimization
  • Target ROAS optimizer best practices
APIs
  • API authentication
  • Reporting API advertiser
  • Reporting API best practices
  • Campaign management
  • Audience API overview
MMP integrations
  • MMP integrations
  • Adjust
  • Appsflyer
  • Singular
  1. Grow your game
  2. Unity Offerwall
  3. Offerwall user acquisition

API Authentication

Authenticate your API requests with the Tapjoy Offerwall API to manage campaign data and performance.
Read time 3 minutes
Last updated 14 days ago

Requesting access

Requests are authenticated using a standard two-legged OAuth2 flow: an
access_token
is requested using an encoded API Key, and the resulting
access_token
is used to authenticate against future requests.
As an Advertiser, you can find this key in the Ad dashboard.
The API key for advertisers shown in the Offerwall 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.
Note
The API Key shown in the dashboard is already encoded. Paste it directly after
Basic 
in the Authorization header. Don't enter it into a username and password field, and don't encode it again. Both of these actions double-encode the key and return a 401 Unauthorized response that looks identical to using an invalid key.

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
The following example shows the token request using curl.
curl -H "Authorization: Basic <API Key>" -X POST https://api.tapjoy.com/v1/oauth2/token
The following example shows how to request an access token and make an authenticated GraphQL query using Ruby.
require 'json'require 'net/https'access_token = "<OAuth Token>"query = <<~ENDquery { user { firstName }}ENDjson = JSON.dump({query: query})http = Net::HTTP.new('api.tapjoy.com', 443)http.use_ssl = truerequest = Net::HTTP::Post.new('/graphql')request['Authorization'] = "Bearer #{access_token}"request.body = jsonresponse = http.request(request)result = JSON.parse(response.body)data = result['data']errors = result['errors']

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 }
If the API Key is invalid or missing, the request returns a 401 status. For example:
status 401{ "error": "Unauthorized" }

Using the access token

When you have an
access_token
, you can make requests to the API. Send the
access_token
in the Authorization header of every request:
Authorization: Bearer <token_string>
If the
access_token
is missing or expired, the API returns a 401 Unauthorized status.
For 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:
  1. Send the Offerwall dashboard API key as
    Authorization: Basic <API Key>
    .
  2. Request
    POST /v1/oauth2/token
    to exchange your API key for an
    access_token
    .
  3. Use the
    Authorization: Bearer <token_string>
    header to authenticate requests.
  4. Send your authenticated queries to the
    POST https://api.tapjoy.com/graphql
    endpoint.

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
If the access token is missing or has expired, the request returns a 401 status.
status 401 { "error": "Unauthorized" }

Copyright © 2026 Unity Technologies
LegalPrivacy PolicyCookiesDocumentation Terms of UseDo Not Sell or Share My Personal InformationYour Privacy Choices (Cookie Settings)

"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S and elsewhere (more info here). Other names or brands are trademarks of their respective owners.

Some pages are machine-translated for convenience, and may contain inaccuracies. In the event of conflicting information, the English version is authoritative.

  • On this page
    • Requesting access

      • Example access requests

      • Request responses

    • Using the access token

      • Example request and response


Report a problem with this page