API Credentials for X (Twitter)
Guide to obtaining tokens, keys, and connections.
Connecting to the X API requires completing a series of steps to obtain the necessary keys. Below is a step-by-step guide on how to get them.
Register a project
-
1
Go to https://developer.x.com and log in with your X account.
-
2
Once inside, access the Dashboard: https://developer.x.com/en/portal/dashboard.
-
3
Click the 'Create Project' button.
-
4
In 'Project name', enter a name for your project and click 'Next'. For example: 'botize'.
-
5
In 'Select a use case', choose a use case and click 'Next'. For example: 'Making a bot'.
-
6
In 'Project description', describe how you will use the API and click 'Next'. For example: 'We use the API to automate tasks between different services on Botize, our automation platform. Users can connect their apps and create workflows that trigger specific actions, such as sending data, posting content, or syncing information across platforms'.
Register an app
-
1
In 'App name', enter a unique name for your application and click 'Next'. For example: 'botize123'.
-
2
X will provide an 'API Key', 'API Key Secret', and a 'Bearer Token', which you will not need yet. Click the 'App Settings' button.
Configure read and write access
We will configure your API access to allow both reading and writing posts and direct messages. Keep in mind that the X API is not free; it operates on a credit-based system, and you will be charged based on usage.
-
1
Scroll down to the 'User authentication settings' section and click the 'Set up' button.
-
2
In 'App permissions', select 'Read and write and Direct message'.
-
3
In 'Type of App', select 'Web App, Automated App or Bot'.
-
4
In 'App Info', within the 'Callback URI / Redirect URL' field, enter: https://botize.com/callback/twitter.
-
5
In the 'Website URL' field, enter: https://botize.com.
-
6
Click the 'Save' button.
-
7
Confirm by clicking 'Yes' on the message 'Changing permissions might affect your App'.
-
8
X will provide a 'Client ID' and a 'Client Secret', which you will not need for this process. Click the 'Done' button.
Get the 'API Key' and 'API Key Secret'
-
1
Click on the 'Keys and tokens' section at the top.
-
2
Click the 'Regenerate' button in the 'Consumer Keys' section.
-
3
X will provide an 'API Key' and an 'API Key Secret'. Save these in a safe place and click 'Yes, I saved them'.
Get the 'Access Token' and 'Access Token Secret'
-
1
Click the 'Generate' button in the 'Access Token and Secret' section under 'Authentication Tokens'.
-
2
X will provide an 'Access Token' and an 'Access Token Secret'. Save these in a safe place and click 'Yes, I saved them'.