Getting Started

How to get access to the Ads API

  1. Apply for developer account
  2. Create a developer App and secure your token
  3. Request access to the Ads API

Note:  If you are already building on the Twitter Developer Platform and have a developer account skip to step three.

 

Step one: Apply and receive approval for a developer account

To make a request to any of Twitter's API products, you must first apply for a developer account, and have your use case approved. Once approved, you can create a Project and connect an associated developer App which will provide you a set of credentials that you will use to authenticate all requests to the API. 


We require an approved use case, authentication and App authorization from Twitter users when making OAuth 1.0a User Context,  to protect the people that use Twitter. Before you apply, we strongly encourage you to understand our developer policy, and to review our list of restricted use cases. If your use case does not adhere to our policy, we will reject your application. 
 

 


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. Until January 2021, you can retrieve an App’s key and tokens through the developer portal.

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 and be approved.

 

Access tiers

To start you will be granted “Developer” 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.

 

Developer

This entry-level Developer license provides companies access to Ads API endpoints to develop their tool to completion. Developer-level access developer Apps are initially limited to five OAuth tokens.

Standard

The next level up. Standard 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 -t -H ads-api.twitter.com “/8/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 . . .

Was this document helpful?

Thank you

Thank you for the feedback. We’re really glad we could help!

Thank you for the feedback. How could we improve this document?

Thank you for the feedback. Your comments will help us improve our documents in the future.