Introduction
Clients can opt to use tokens to avoid exposing server-side API calls to unauthorized parties. There are two types of tokens: static and dynamic. If the token is incorrect or missing, you will receive a 401 response with the following content:Static Tokens
- Contact your technical representative: Reach out to your Technical Account Manager to have a token generated internally and shared with your team.
- Authentication header: Add the token in the authentication header of your API calls.
Dynamic Tokens
A dynamic token expires after a certain period. Every time it expires, you must make a new request to the authentication service to generate a fresh token.- Set up an app: Generate an API token by setting up an app in our developer portal. Follow the instructions here: Configuring Your API Application.
- Share application ID: Share your
application_idwith your TAM. This ID will be used to set up our authentication server. - Authentication request: Make an authentication request as described here: Authentication.
- Get token: You will receive a token that can be used to make calls to the ad delivery API.
Example of API Calls with Authentication
Static token example
Dynamic token example
- Request token
- Use token