Twitter (X) API Keys
Step-by-step guide to generate your X Developer API keys.
Last updated
Step-by-step guide to generate your X Developer API keys.
Last updated
To connect your AI agent to Twitter (X), you'll first need to create a developer account, then set up an app, and finally retrieve your API credentials.
Go to .
Sign in and click “Developer Portal” in the top-right corner.
Choose the Free Account tier and click “Sign up”.
Fill out the form:
Check all the requested boxes.
In the “How will you use the API?” field, provide an example like:
I want to explore your API to automate publishing of our content <about what?>. The content includes satirical news commentary, unique visuals such as memes and videos. We also want to explore other accounts and their performance to make sure our content is relevant.
Submit the form — X will auto-create a Project and an App for you.
If you already have an app, skip to: “Adding an Existing App to the Project.”
Inside the Developer Portal, go to your App Settings.
Click “Set up” under User authentication settings.
Apply the following configuration:
App Permissions:
Read, Write, and Direct Messages
Type of App:
Web App
, Automated App or Bot
Callback URLs (paste both):
Website URL:
Click “Save”, then confirm with “Yes” when prompted.
Go to the Keys and Tokens section of your app and copy the following:
API Key & API Key Secret
2. Access Token & Access Token Secret
🔐 Keep these safe — you’ll need them to connect your agent via the MindsCraft UI.