Connecting X (Twitter)
People write to your X account in direct messages and in X Chat, and the conversations arrive in the same inbox as WhatsApp, Telegram and email, where you or your AI agent answer. One sign-in with X connects the account; a four-digit passcode opens the encrypted chat; X's own prices are paid from your workspace balance.
- An X account you can sign in to, and the X app or x.com open to approve the sign-in. A business account works the same way as a personal one.
- If you use X Chat (the chat inside X that shows a lock), the four-digit passcode you set when you turned it on. Without it DialogBrain sees your ordinary direct messages but not the messages written in X Chat.
- Credits on the workspace balance. X charges for every message read and sent, and DialogBrain passes those prices on unchanged: about one cent per incoming message, one and a half cents per message you send.
- Step 1
Open the X tile in Connections
In the inbox, the gear above the channel filters opens Connections. On the Add tab find the tile with the X logo (it is labelled Twitter) and press it. The form offers two ways in: Quick Connect, and Use My Own Keys for people who already run their own X developer app. Quick Connect is the one for everybody else.

Connections → Add → Twitter. - Step 2
Press Quick Connect and sign in with X
X opens in a new window and asks you to authorize DialogBrain. Sign in to the account you want connected (check the name at the top of the X page: X signs you in as whoever is already logged in) and press Authorize app. You are sent back to DialogBrain, and the account appears in the Connected list with your handle.
Nothing is created in the X developer portal and no keys are copied. The sign-in is renewed by DialogBrain on its own; you are asked again only if you revoke the app in your X settings.
- Step 3
Enter your X Chat passcode
Right after the sign-in DialogBrain shows Connect X chat with one field for the four-digit passcode of your X Chat. The code is used once, to restore your chat keys from X's backup, and is not kept. Type it carefully: X locks the chat keys after too many wrong attempts, and a locked chat would need to be reset in X itself. One careful try, then Connect chat.
If you do not use X Chat, press Skip. You can enter the code later: the account's card in Connections says "X chat not connected - replies are not visible" with a Connect button next to it until you do.
- Step 4
Write to your account from another X account
Send a direct message to your account from a second X account, or ask someone to. It appears in the inbox under the X filter within seconds, with the sender's name. Reply from the inbox: your reply arrives in X as an ordinary direct message (inside X Chat it is marked as unencrypted, which is normal).
A message written in X Chat arrives the same way once the passcode is in. If it does not, open the account in Connections and check the chat line on its card.
- Step 5
Put an agent on the account
Connecting a channel does not put an agent on it. Until you assign one, the inbox is only an inbox and you answer yourself. When you do assign one, start in Draft mode: the agent writes, you approve. A day of reading its drafts tells you what to add to its instructions before it answers on its own.
What it costs
X charges for its API per message, and DialogBrain charges your workspace balance the same amounts, nothing on top: reading an incoming direct message or X Chat message is $0.010, sending a message is $0.015, publishing a post is $0.015, publishing a post that contains a link is $0.20, and looking up a person's name is $0.010. Each incoming message is counted once per day however many times it is read.
An account that receives nothing still costs about one cent per conversation per day, because DialogBrain checks each conversation for new messages. The form says this before you connect, and the balance page shows every X charge as a separate line.
Use My Own Keys changes who pays: X bills your developer account directly and nothing is charged to the workspace balance.
Realtime replies and the pause button
With the chat connected, a new message in X Chat reaches the inbox within seconds and wakes the agent. The pause button in the account's card turns that off: on pause nothing is read on its own, and replies appear when you refresh the X inbox or an agent reads the conversation. The card then says Replies on demand. Pressing resume asks you to confirm the per-message price first.
One X account can be realtime in one workspace only. If the same account is connected in a second workspace, that workspace reads on demand and its card says so.
Writing first to someone new
From the inbox or through an assistant you can message a person who has never written to you, by their @handle. X delivers it only if their inbox is open to people they do not follow, or if they shared their X Code with you; otherwise X refuses the message and DialogBrain says so next to it. Keep the first message about them, not about you, and do not send the same text to many people: X suspends accounts for that.
Posting to X
An agent, or an assistant connected over MCP, can publish a post to the connected account, with up to four pictures. A post with a link in it costs $0.20 instead of $0.015, so put the link in a reply or in your profile when the post itself does not need it.
Use My Own Keys
If you already have an app in the X Developer Portal, you can connect through it instead of DialogBrain's app. In the portal open your app → User authentication settings, choose the type "Web App, Automated App or Bot", the permissions "Read and write and Direct message", and paste the Callback URI shown in the form. Then open Keys and tokens and copy the OAuth 2.0 Client ID and Client Secret (not the API Key and Secret: with those X answers "Something went wrong"). Paste both into the form and press Connect with My Keys.
Can an AI agent answer my X (Twitter) direct messages?
Yes. Connect the account, assign an agent, and it answers direct messages and X Chat messages from the same inbox as your other channels. Start it in Draft mode so you approve each reply until its instructions are complete.
Does DialogBrain see messages written in X Chat?
Yes, once you enter your four-digit X Chat passcode. X Chat is encrypted, and the passcode restores the keys that decrypt it. Without it only ordinary direct messages are visible, and the account's card says so.
Is it safe to type my X Chat passcode into DialogBrain?
The code is used once to restore the chat keys from X's backup and is not stored. The keys are kept encrypted and only for this account; disconnecting the chat or removing the account deletes them. Type it carefully: X locks the keys after too many wrong attempts.
Why was my message to a new person refused?
X only delivers a first message to someone whose inbox is open to you: they allow messages from everyone, they follow you, or they shared their X Code with you. DialogBrain shows X's refusal next to the message. Ask them to open their inbox or to write to you first.
How much does connecting X cost?
Exactly what X charges: $0.010 per incoming message, $0.015 per message sent, $0.015 per post ($0.20 with a link), each incoming message counted once a day. Paid from the workspace balance; nothing is added on top. With your own developer keys X bills you directly instead.
The card says "Replies on demand". What does that mean?
The account is paused, or the same X account is realtime in another workspace. New messages are read when you refresh the X inbox or when an agent reads the conversation, instead of arriving on their own. Press resume to get realtime replies back.
The card says the X chat keys changed. What do I do?
You reset or changed the passcode in X, so the stored keys no longer open the chat. Press Connect on the card and enter the current passcode once. Messages that arrived in between are read as soon as the chat is connected again.