How to get access to the Ads API
- Sign up for a developer account. Both Essential and Elevated developer access can access the Ads API. Please see the access levels to determine what access is required.
- Create a developer App and secure your token
- Request access to the Ads API by reaching out to your Twitter representative.
Note: If you are already building on the Twitter Developer Platform and have a developer account, skip to step three.
Step one: Signup for a developer account
To make a request to any of Twitter's API products, you must first sign up for a developer account. Within the developer portal, create a Project and developer App. This will provide you a set of credentials that you will use to authenticate all requests to the API.
Step two: Save your App's key and tokens and keep them secure
Within your developer App, you will be provided a set of API Keys (also known as Consumer Keys). You will also have the chance to generate a set of Access Tokens that can be used to make requests on behalf of your personal Twitter account, and a Bearer Token that can be used to authenticate endpoints that require OAuth 2.0 Bearer Token. As these keys and tokens do not expire unless regenerated, we suggest creating environment variables, or using a secure password manager.
Please also take note of your App ID, which can be found in the URL of your App details. This will make it easier to request access to the Ads API in the next step.
Please note: Your keys and tokens will only display once in the developer portal, so it is important that you store these credentials in your password management system as soon as you generate them.
If you misplace or forget the keys and tokens, you will need to regenerate them, which creates new keys and tokens, and invalidates the old ones. This means that you will have to update any integrations that you may have set up with your prior credentials.
Learn more about our authentication best practices.
Step three: Apply for access to the Ads API
At this point you will have basic access to the Twitter API, but not specific Twitter Ads API functionality. Next, you will need to request access by reaching out to your Twitter representative and get approved.
Access tiers
To start you will be granted “Limited” access to the Ads API with an initial limit of five Twitter users who can use your app. At this time your app is able to make requests to the Ads API. As you develop your integration with the Ads API you may need to increase your token limit. For information on how to increase these limits see the increasing access guide.
Limited
This entry-level Limited license provides companies access to Ads API endpoints to develop their tool to completion. Limited-level access developer Apps are initially limited to five OAuth tokens.
Advanced
The next level up. Advanced access indicates a developer has proven their concept in live pilot campaigns. OAuth token limits are lifted on the developer App to allow business to scale.
Make your first request
To test your access to the Ads API make a request to the GET accounts endpoint. This endpoint will return the ad accounts the currently authorized user has access to. Use the ad account IDs from this request in subsequent API requests to read and write data for a specific ad account. Using Twurl on the command line the request would look like the following.
Example Request
twurl -H ads-api.twitter.com "/11/accounts"
Example Response
{
"request": {
"params": {}
},
"data": [
{
"name": "Furni",
"business_name": null,
"timezone": "America/Los_Angeles",
"timezone_switch_at": "2016-04-06T07:00:00Z",
"id": "18ce54ayf0z",
"created_at": "2016-04-07T14:40:15Z",
"salt": "b88939e5cabbca720159cb3659d73c06",
"updated_at": "2017-02-08T08:49:53Z",
"business_id": null,
"approval_status": "ACCEPTED",
"deleted": false
}
]
}
Up next . . .
- Read through the Ads API documentation fundamentals such as versioning and hierarchy.
- Check out the various Ads API tools & libraries to aid you in your Ads API integration.
- Understand the steps to increase Ads API access.
- Familiarize yourself with available support resources.
- Follow @TwitterAPI for live updates on API changes, service issues and enhancements to Twitter promoted products.