API authentication

Authenticate your API requests using your ironSource credentials to securely access reporting and management endpoints.

Read time 1 minutes

All ironSource API endpoints are secured, and must be used with an authentication token. First, you'll need to add an authorization header for authentication.

Bearer API authentication

A Bearer API authentication is needed for the use of ironSource's Application API and Instance API.

Description

Bearer API authentication is based on auth 2.0 Bearer authentication. The HTTP Authorization header is created based on your account's unique Secret key & Refresh Token. You can find your unique parameters under 'My Account':

1

Method

GET platform.ironsrc.com/partners/publisher/auth

Request URL

https://platform.ironsrc.com/partners/publisher/auth

Request example

$authURL = 'https://platform.ironsrc.com/partners/publisher/auth';
$authHeaders = array(
        'secretkey: <e83defbasdasd9227a9d2a952b2c5ec8b02e>',
        'refreshToken: <ee453860sd9227a9d2a952b2c5e476iii3gh5>',
);

$curlClient = curl_init($authURL);
curl_setopt($curlClient, CURLOPT_HTTPHEADER, $authHeaders);
curl_setopt($curlClient, CURLOPT_RETURNTRANSFER, true);
$bearerTokenResponse = curl_exec($curlClient);
$bearerToken = str_replace('"','',$bearerTokenResponse);
curl_close($curlClient);

Response example

eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZWNyZXRLZXkiOiJlODNkZWZiNjQ5MjI3YTlkMmE5NTJiMmM1ZWM4YjAyZSIsInJlZnJlc2hUb2tlbiI6IjU1MjU1NTNkN2NiODdjNGNhYjdlYmEwODI4NThkMjFhIiwiZXhwaXJhdGlvblRpbWUiOjE1NDY0Mzc2Mjd9.mqtDslsA1E_MnFvyiMrBCz3DgUhEQaSUChVd_Ajvvf8

The generated token should be used for the bearer token authorization:

GET https://platform.ironsrc.com/partners/publisher/instances/v1?appKey=123abc
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZWNyZXRLZXkiOiJlODNkZWZiNjQ5MjI3YTlkMmE5NTJiMmM1ZWM4YjAyZSIsInJlZnJlc2hUb2tlbiI6IjU1MjU1NTNkN2NiODdjNGNhYjdlYmEwODI4NThkMjFhIiwiZXhwaXJhdGlvblRpbWUiOjE1NDY0Mzc2Mjd9.mqtDslsA1E_MnFvyiMrBCz3DgUhEQaSUChVd_Ajvvf8

Standard API authentication

Description

This type of authentication is based on Basic HTTP Authentication with HTTPS. The HTTP Authorization header is created based on the base64 version of username:secret key.

  • username is the login/email that is used to login to our system.
  • secret key parameter is unique for your ironSource account.

You can find your Secret Key under My Account:

1

Request Headers example

Basic UG9wY2FwOjI3MGYwODRirrxNmM0YTliNmUyMmFkMjRkOTA1ZGYz