How to get access to the Twitter API
Step one: Sign up for a developer account
Signing up for a developer account is quick and easy! Just click on the button below, answer a few questions, and you can start exploring and building on the Twitter API v2 using Essential access.
Next you will create a Project and an associated developer App during the onboarding process, which 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
Once you have access and have created a Project and App, you will be able to find or generate the following credentials within your developer App:
API Key and Secret: Essentially the username and password for your App. You will use these to authenticate requests that require OAuth 1.0a User Context, or to generate other tokens such as user Access Tokens or App Access Token.
Access Token and Secret: In general, Access Tokens represent the user that you are making the request on behalf of. The ones that you can generate via the developer portal represent the user that owns the App. You will use these to authenticate requests that require OAuth 1.0a User Context. If you would like to make requests on behalf of another user, you will need to use the 3-legged OAuth flow for them to authorize you.
Client ID and Client Secret: These credentials are used to obtain a user Access Token with OAuth 2.0 authentication. Similar to OAuth 1.0a, the user Access Tokens are used to authenticate requests that provide private user account information or perform actions on behalf of another account but, with fine-grained scope for greater control over what access the client application has on the user.
App only Access Token: You will use this token when making requests to endpoints that responds with information publicly available on Twitter.
Since these keys and tokens do not expire unless regenerated, we suggest that you save them in a secure location, such as a password manager, once you've received your credentials.
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 credentials 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: Make your first request
What’s next? Let’s make your first request to the API!
We have guides, tutorials, tools, and code to help you get started. The following page will be a great place to start, but note that we’ve also put together an important resources page to help you navigate the broader documentation.
[Optional] Step four: Apply for additional access
With Essential access, you are only able to make requests to the Twitter API v2 endpoints, and not the v1.1 or enterprise endpoints. You are limited to 500K Tweets/month, and unable to take advantage of certain developer portal functionality such as teams and access to additional App environments.
If you want to access the standard v1.1, premium v1.1, or enterprise endpoints, or if you want to take advantage of an increased Tweet cap and developer portal functionality, you will need to apply for Elevated or Academic Research access.
You can apply for Elevated or Academic Research access from within the developer portal if you already have a developer account.
Find an endpoint to start working with via our API reference index.
We also have a set of Twitter API tools and libraries that you can use to speed up your integration.