Twitter (X) API Keys

Step-by-step guide to generate your X Developer API keys.

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.

✅ 1. Create an App on the X Developer Portal

  1. Sign in and click “Developer Portal” in the top-right corner.

  2. Choose the Free Account tier and click “Sign up”.

  3. Fill out the form:

    • Check all the requested boxes.

    • In the “How will you use the API?” field, provide an example like:

  1. 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.”


✅ 2. Set Up Your App

  1. Inside the Developer Portal, go to your App Settings.

  2. Click “Set up” under User authentication settings.

  3. Apply the following configuration:

    • App Permissions: Read, Write, and Direct Messages

    • Type of App: Web App, Automated App or Bot

    • Callback URLs (paste both):

      https://www.mindscraft.ai/oauth/cb/twitter2  
      https://www.mindscraft.ai/oauth/cb/twitter
    • Website URL:

      https://www.mindscraft.ai
  4. Click “Save”, then confirm with “Yes” when prompted.


✅ 3. Retrieve Your API Keys

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.

Last updated