> For the complete documentation index, see [llms.txt](https://docs.1millionbot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.1millionbot.com/chatbot/channels/twitter.md).

# Twitter

## Set up

> ⚠️ **Important:** in 2026 X moved its developer platform to a **pay-per-use** model (you buy credits upfront; there's no longer a meaningful free tier), and access to the **Account Activity API** — needed to receive direct messages via webhook — requires applying for an **Enterprise / Pay Per Use** tier, subject to X's approval. Without that approval, you won't be able to activate this channel even if you complete all the steps below.
>
> This guide may become outdated if X changes its platform again. Always check the official documentation: [X API Docs](https://docs.x.com).

To set up your agent's Twitter/X integration, you'll need the following:

* An X account linked to a phone number.
* A developer account at [developer.x.com](https://developer.x.com) with a payment method configured.
* Approved access to the Account Activity API (see below).

### Create an X app

1. Access the [X developer console](https://developer.x.com).
2. Create a new app and give it a name.
3. Configure the authentication options in **User authentication settings**: enable OAuth 1.0a and select the "Read and write Direct Message" permission.
4. Copy this channel's URL (found in the 'Info' button of the Twitter integration on the 1millionbot platform) and paste it into 'Callback URI/Redirect URL'.
5. Enter your website and save the changes.
6. In the app's **Keys and tokens** section, generate and copy the **API Key and Secret** and the **Access Token and Secret**. They're only shown once.

### Request access to the Account Activity API

1. The Account Activity API (which allows receiving direct messages via webhook) operates on the **Enterprise / Pay Per Use** tier and requires requesting access through the developer console.
2. Describe your use case when asked (for example: activating a webhook that connects a chatbot to the account's direct messages, to automatically answer users' questions).
3. Wait for X's approval before continuing.

{% hint style="info" %}
**Important:** the approval time and the cost of this tier depend on X and may vary; they are not under the control of the 1millionbot platform.
{% endhint %}

### Activate integration

1. In the Twitter/X integration module, enter the API Key, API Key Secret, Access Token, and Access Token Secret you copied earlier.
2. Save the settings: the platform automatically registers and subscribes the webhook for you (there's no longer a need to manually create a "Dev Environment").
3. Done!:tada: Run tests to verify the operation of your agent on X.

## Limitations

* Messages with buttons or quick replies aren't supported in this version of the integration: X's current Direct Messages API (`/2/dm_conversations`) doesn't document that support, unlike the old API. Text and image messages can still be sent.
* Message sending limits depend on the pay-per-use tier contracted on X; check the [official limits documentation](https://docs.x.com) for the figures that apply to your plan.
