Developer Support

Twitter API


The Twitter API enables programmatic access to Twitter in unique and advanced ways. Use it to analyze, learn from, and interact with Tweets, Direct Messages, users, and other key Twitter resources.

  • General
  • Errors
  • Policy
  • Billing
  • Account
  • Community
  • Enterprise
  • Academic Research

Getting started

Getting started

You will need a developer account to use the Twitter API. This gives you access to the Twitter developer portal: a set of self-serve tools that you can use to manage your access to the premium APIs, as well as to create and manage your Twitter Apps. 

Read more about how the developer portal can help you check and debug your access to the Twitter API.

Review our getting started documentation to find out what’s possible to build with the different tools and APIs that are available on the platform, and how to get the access and information required to get started. 

We also have a series of Quick Start guides to bring you to your first “Hello World” in no time:

API status

API status

Our API status page contains up-to-date information about the Twitter API and highlights ongoing and past incidents. You can subscribe to updates from this page to receive notifications whenever there is an incident, issue, or outage. This can help you rule out and narrow down issues on your own side.

Using your keys and tokens

Using your keys and tokens

Accessing the Twitter API requires a set of credentials you must pass with each API request. Your credentials consist of a set of keys and tokens that are generated when you first create an App in your developer dashboard. If you don’t yet have a developer account, you can apply for one now.

Read more about the different authentication methods supported by the Twitter API.

Securely storing your keys and tokens

It is important that you store your keys and tokens securely. In January 2020, we stopped showing your access token and access token secret in your Twitter developer App dashboard beyond the first time that these credentials are generated. 

If you lose your tokens, or believe that they have been compromised, you can regenerate your keys and tokens via the App dashboard. Note that regenerating your keys and tokens will invalidate any previous keys and tokens and you may need to rewrite and/or redeploy existing code.

Keeping your credentials safe

These credentials are directly tied to your Twitter developer App and those Twitter accounts that have authorized you to make requests on behalf of them. If your keys are compromised, bad actors could use them to make requests to the Twitter endpoints on behalf of your Twitter App or its authorized users, which could mean their requests might cause you to hit unexpected rate limits, use up your paid access allotment, or even cause your Twitter developer App to be suspended. 

Read more about storing your keys and tokens securely and authentication best practice. 

Troubleshooting authentication issues

If an API call returns an authentication error, check your keys and tokens, authentication method, and App permissions. In the case of errors with OAuth 1.0a User Context authentication, you can also attempt to re-trigger the 3-legged OAuth process.

Review our guide on troubleshooting authentication issues for additional information.

You can also search the community forums to find answers to frequently asked questions about security and authorization (OAuth).

API limits and caps

API limits and caps

All endpoints require authentication, so there is no concept of unauthenticated calls and rate limits.

Note that rate limits are set per-application and per-user levels. 

  • Twitter App level indicates the number of requests allowed when using OAuth 2.0 Bearer Token, where rate limits are determined globally for the entire App. For example, if a method allows for 15 requests per rate limit window, then it allows you to make 15 requests per window on behalf of your Twitter App. This limit is considered completely separately from the user-level limit. Read more in our guide on OAuth 2.0 Bearer Token.
  • User-context level indicates the number of requests that can be made per user access token, when using OAuth 1.0a User Context. For example, if a method allows for 15 requests per rate limit window, then it allows 15 requests per window and per user access token. Read more in our guide on how to obtain a user’s access tokens.

Follow the links below for additional information on rate limits, including rate limit intervals, how to use HTTP headers to track where your App is at for a given rate limit, how to recover from a rate limit 429 error code, and tips to avoid being rate limited:

FAQs

FAQs

Search the Twitter community forum to browse answers to frequently asked questions. 

Before you post a question

When you post a question, make sure to include the following information

  • A description of the problem

  • The API call being made (include headers, if possible)

  • The Twitter response returned (include any error messages)

  • What you expected to receive instead

  • List of steps taken to troubleshoot the issue

  • List of steps required to reproduce the issue

  • If relevant, the time frame during which an issue occurred 

  • If relevant, the App ID, Tweet ID, etc.

  • Any relevant code sample or screenshots

Please only include one topic/question per post. 

For feature requests or missing functionality, please use our feedback platform instead.

Get help

Get help

Use the Twitter community forum to get support from a global network of developers and Twitter employees.

If you have enterprise access to the Twitter API, please contact your Alliance Manager directly for technical support options.

Who to contact when

The below table lists possible reasons for which you may need to contact a member of the Twitter team and highlights who to reach out to.

Subject

Who to contact

Subject

Technical question on the API, a feature, or product

Report that the API is down or that there is an outage of some sort

Twitter API bug report

Who to contact

Twitter community forum

Make sure to also check the API status page for known issues

Subject

Non-technical question on the API, a feature, product, or pricing

Subject

Twitter API feature request

Subject

Use case request or question

Subject

Policy-related issue (e.g. App suspension)

Who to contact

 

Policy support (if you have enterprise access to the Twitter API, please also notify your Alliance Manager)

Subject

Twitter login and account support

Twitter bugs and broken features (not relating to the Twitter API)

Other Twitter-related issues (not relating to the Twitter API)

Who to contact

Please review our guide on errors and troubleshooting for help with errors.

As part of our commitment to this community, we aim to provide data access that is open and fair for developers, safe for people on Twitter, and beneficial for the Twitter platform as a whole. To further these goals we’ve crafted the Developer Policy as a guide to help people understand our rules and expectations about appropriate API and Twitter Content usage. 

Have ideas for how we can improve the Twitter Developer Policy in the future? You can submit these through our feedback platform.

Restricted use case

Restricted use case

Use of our developer platform requires that you review and agree to our Developer Agreement and Policy, as well as our related policies, including the Display Requirements and Automation Rules. Among other things, our agreements and policies provide guidance about several restricted use cases.

Please remember that we review all proposed uses of the Twitter developer platform to verify policy compliance — so you’re required to disclose (and update, as applicable) your planned use of the Twitter API and Twitter Content in order to be granted and to maintain access. To maintain the health of the platform we monitor Twitter API and Twitter Content usage. You can ensure you're up to date with our policies by carefully reviewing our Developer Terms.

Get help

Get help

Please fill out this form to get Policy support in the following scenarios:  

  • My App has been suspended or restricted from performing write actions

  • I need to transfer an API key to another account

  • I need to report an API policy violation

  • I would like to create more than ten Apps

  • I need to update my developer use case

  • Other policy-related matters, not covered by the above

Have a question?

Have a question?

You can probably find an answer to your question in the Rules and Policy section of the Twitter community forum. There, you can browse existing topics and learn from others. 

Before you post a question

When you post a question

  • Include a description of the problem

  • Please only include one topic/question per post

For feature requests or missing functionality, please use our feedback platform instead.

A billing page is available in your developer dashboard under the "Account" section located in the side panel. 

Your billing page features information on your billing cycle and most recent charges, your payment method, and a list of your previous transactions. If you click on a transaction ID, you will be taken to a more detailed view of that invoice.

Review our guides on billing or browse our premium API billing FAQ.

Have a question?

Have a question?

You can probably find an answer to your question in the Developer Portal section of the Twitter community forum. There, you can browse existing topics and learn from others. 

Before you post a question

When you post a question

  • Include a description of the problem

  • Please only include one topic/question per post

For feature requests or missing functionality, please use our feedback platform instead.

In order to access the Twitter API, you need to have an approved developer account. If you don’t yet have one, you can apply for access.

Getting started

Getting started

Our getting started documentation includes the information you need to be successful with your developer account.

API usage

API usage

You can monitor your level of usage of subscription API endpoints relative to your monthly limits in the "Subscriptions" section of your developer dashboard.

Developer account applications

Developer account applications

If your application for a developer account is pending, we may have sent you a request for more information. Please check your email Inbox for communications from the no-reply email address developer-accounts@twitter.com. This will be the Inbox for the email address linked to your application. Make sure you also check your Spam and Junk folders. 

If your application for a developer account was rejected, there currently is no way to edit a rejected application, or to re-apply. However, stay informed for product updates/changes.

Please do not post on the Twitter community forum about pending or rejected developer accounts, as we are unable to assist you there.

Have a question?

Have a question?

The Twitter developers docs contain a list of FAQs about the developer portal application process and developer portal management.

You can also look for an answer to your question in the Developer Portal section of the Twitter community forum. There, you can browse existing topics and learn from others. 

Before you post a question

When you post a question

  • Include a description of the problem

  • Please only include one topic/question per post

For feature requests or missing functionality, please use our feedback platform instead.

The Twitter community forum is available for you to ask technical questions about the Twitter developer platform. This is a discussions forum where you will find questions by other developers and technical information on a variety of topics related to using the Twitter API.

We encourage you to join the conversation by responding to questions and engaging in conversations on our forum. Twitter employees are also there to provide support.

Before posting a new question, please review our guide to getting your questions answered below.

Guide to getting your questions answered

Guide to getting your questions answered

Before you post your question

When you post your question, make sure to include the following information

  • A description of the problem

  • The API call being made (include headers, if possible)

  • The Twitter response returned (include any error messages)

  • What you expected to receive instead

  • List of steps taken to troubleshoot the issue

  • List of steps required to reproduce the issue

  • If relevant, the time frame during which an issue occurred 

  • If relevant, the App ID, Tweet ID, etc.

  • Any relevant code sample or screenshots

Please only include one topic/question per post. 

For feature requests or missing functionality, please use our feedback platform instead.

 

Enterprise access to the Twitter API gives you access to real-time and historical social data to power your business at scale. Access to Twitter's enterprise API platform includes dedicated support.

Who to contact when

Who to contact when

Subject

Twitter Contact

Subject

Technical question on the API, a feature, or product

Bug reports

Twitter Contact

Technical support team

Subject

Report that the API is down or that there is an outage of some sort

Twitter Contact

  1. Check the API status page for up-to-date information
  2. For additional support, contact the technical support team

Subject

Question on your contract, pricing, upgrades, renewals, or general billing

Question regarding any changes on your approved use case(s), including new uses of data in demos, trials, or for new prospective public sector end users

Question about our policies after you have read the Twitter MLA, Developer Agreement and Policy, Restricted Uses of the Twitter APIs and Automation Rules

Twitter Contact

Alliance Manager

Subject

Policy-related issues (e.g. App suspension, report an API policy violation, etc.)

Twitter Contact

  1. Fill out this form (make sure to be logged in to the Twitter account that you are raising an issue for)
  2. Notify your Alliance Manager or technical support team

 

Subject

New API feature request

Twitter Contact

Alliance Manager or the Twitter API feedback platform

Please contact your Alliance Manager directly for further details on any of the above or for any other questions.

Useful documentation

Useful documentation

Realtime - Make data-driven decisions in real-time

Historical - Study the past to predict the future

Insights - Understand content performance

Policy

Twitter data can help academic researchers analyze and understand what’s happening around the world.

Learn more about using Twitter data for academic research.

Get help

Get help

We have a dedicated forum category for academic research that you can use to discuss the use of Twitter data in research, including methodological guidance, research best practices, etc. Please do not use this category for questions about your developer account application. Please use the Twitter API category of the community forum for technical questions.

Give feedback

Give feedback

Have ideas for how we can improve our offering for Academic Researchers in the future? You can submit these through our feedback platform dedicated to Twitter for academic research.