API Key and Secret
The API Key and Secret (also known as Consumer Key and Secret) are the most fundamental credentials required to access the X API. These credentials act as the username and password for your X App, and are used by the X API to understand which App requests are coming from. These credentials can be used by authentication endpoints to generate additional credentials, such as user Access Tokens and Secrets, and Bearer Tokens. You also need to use these credentials along with Access Tokens and other authorization parameters to authorize requests that require OAuth 1.0a User Context authentication.How to acquire an API Key and Secret
To acquire a X API Key and Secret, please follow these steps:- Sign up for a X developer account
- Create a X App within the developer portal. Note that if you would like to use X API v2, you must add your X App to a Project.
How to find and regenerate your API Key and Secret after App creation
If you’ve already created an App and need to find or regenerate your API Key and Secret, please follow these steps:- Navigate to the developer portal
- Expand the ‘Projects and Apps’ dropdown in the sidenav
- Open the App which is associated with the API Key and Secret that you would like to find or regenerate
- Navigate to the Keys and tokens tab