Get Started with the AdRoll API

The AdRoll API is divided into several services, each with it’s own focus. Every API uses a common base URL and the authentication method. API parameters and responses can vary with each service. However we try to use consistent terminology across services. If you have any questions, you can contact the API team.

For a high-level overview of the AdRoll object structure, see Get to know AdRoll.

Register as a Developer

To make API calls, you’ll need to register as developer and create an application:

  1. Create a developer account
  2. Create an application

It is recommended that you create an application for production and one for testing. This allows you to have a separate OAuth 2.0 redirect URI for each of your development environments.

The default quota is 10,000 API requests per day. If you think you need your limit increased, send us a message.

Note

Once you’ve registered your application, you’ll see both a consumer key and secret. You’ll only use the consumer key when making API calls using HTTP Basic Access Authentication. You’ll use both key and secret when authenticating with OAuth 2.0.

Base URL

The base URL for all API calls is:

https://services.adroll.com

HTTPS is the only supported protocol.

Authentication

OAuth 2.0

All API calls are authenticated using OAuth 2.0. For information on how to use OAuth 2.0 see Get Started with OAuth 2.0.

HTTP Basic Access Authentication

Historically developers have been able to use HTTP Basic Access Authentication to make API calls. This method is deprecated and we recommend using OAuth 2.0.

When using HTTP Basic Access Authentication, use the same email address and password you use to sign into the AdRoll Dashboard. Please note to not use AdRoll Developer Site login in API calls as it is separate from the AdRoll Dashboard login.

For all requests, you’ll need to pass your application’s Client ID in the apikey query parameter. The apikey parameter is always sent in the URL’s query string, regardless of the HTTP method used. The apikey parameter should not be included in the body of the request for POST, PUT, or PATCH calls.

Your First API Call

The Advertisable is the basic unit of customer accounts at AdRoll. Since the Advertisable EID will be used for most API calls, it is recommended to retrieve the Advertisable EID as your first API call.

Using cURL:

curl --user dev@example.com:my-password-is-great \
    'https://services.adroll.com/api/v1/organization/get_advertisables?apikey=MYAPIKEY'

Using the Requests library in Python:

adroll_auth = ('dev@example.com', 'great-password')
r = requests.get(
    'https://services.adroll.com/api/v1/organization/get_advertisables?apikey=MYAPIKEY',
    auth=adroll_auth
)

Using PHP:

<?php
// create curl resource
$ch = curl_init();

// set url
$url = "https://services.adroll.com/api/v1/organization/get_advertisables?apikey=MYAPIKEY";
curl_setopt($ch, CURLOPT_URL, $url);

// return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Set credentials
$credentials = "dev@example.com:my-passsword-is-great";
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, $credentials);

// $output contains the output string
$output = curl_exec($ch);