Integrate the Audience API to include or exclude specific users in their campaign, based on lists of device IDs supplied by the advertisers.
Read time 4 minutes
The Audience API allows advertisers to include or exclude specific users in their campaign, based on lists of device IDs supplied by the advertisers.
How do I define my audience set?
The ironSource Audience API supports two kinds of Audience lists: Suppression and Targeting.
Suppression lists
Suppression lists are associated with the campaign through a package name and platform, for example "com.facebook.katana" and "android". Each Suppression list supports one respective platform, either IDFA or GAID. This type of audience set operates as a blacklist. After a Suppression list is uploaded into our database, the audience set will automatically be opted out from every campaign that has a matching package name and platform.
Targeting lists
Targeting lists consist of device IDs which are defined and identified by the advertier, these lists can be included for different campaigns regardless of package name. This audience list supports both IDFA and GAID which can be update through the API. Targeting lists aren't automatically associated to any given campaign; an Account Manager must assist in either opting in or out of the list of devices per campaign.See the following table for example cases on when to use the above audience lists:
Objective
Set Up
Mandatory Fields
Suppression list
Block users from a specific campaign
Automatically blacklisted
Package name & Platform
Targeting lists
Create retargeting campaigns or target any given audience set
Must be uploaded by AM
Advertiser ID
Authentication ID
For our system to identify your API requests, you will need an authentication ID. Follow these steps to generate this credential:
Generate your Authorization Header and Add it to Your PHP Code
To generate your Authorization header, you'll need to obtain your ironSource account's secret key:
Log in to the ironSource dashboard.
Click on your profile in the top right corner of the dashboard and select My Account from within the dropdown.
Then go to the Reporting API tab and you'll find your secret key.
Next, encode your
username:secret
key based on the base64 version and add an Authorization header in your code with your encoded
username:secret
key.
Note
Authentication is based on basic HTTP Authentication with HTTPS.
PHP code example to generate a username using secretkey with base64