preload logo

 An API, or Application Programming Interface, is a set of defined rules that allow two or more software programs to communicate with each other. Advertisers can use the API to create and manage ad campaigns, while publishers can use it to manage sites and spots.

The API provides all the functionality available to users in the admin.trafficstars.com web interface, as well as several additional features that simplify working with large amounts of data and entities.

Advertisers can use APIs to

Publishers can use APIs to:

How to start using the API:

#1 Generate an API key in your client profile . The received token is an offline token in OAuth 2.0 terminology.

undefined

#2 To obtain a session API token, you need to use the Auth by the offline token method.

Request:

undefined

Response:

undefined

The two fields we are interested in in the response are access_token and refresh_token.

  • access_token is a token for the current session. It will be used to authorize all subsequent requests. It is valid for expires_in seconds (by default, one day).

  • refresh_token can be saved in your system and used multiple times to get a new access_token.

The received access_token can be used for requests to the API as a Bearer token.

For example, to get your account balance:
Request:

undefined

Response:

undefined

Done! Now you can continue working with any of our API methods!