X (Twitter) integration for AI agents.
Let your AI agents work in X — read timelines, post updates, and monitor social context — through a routed, audited connection. Open Connector runs the OAuth, seals the token in an encrypted vault, and serves X (Twitter) tools to your agent over MCP or a typed API — credentials injected server-side, every call audited, nothing leaving your infrastructure. Open source (AGPL-3.0) and self-hostable.
Real X (Twitter) actions, managed and audited.
Your user connects X (Twitter) once; your agent can then read timelines, publish posts, and fetch social context — scoped to the OAuth permissions you grant and the tool allowlist you configure. Every action is least-privilege and written to a tamper-evident audit trail.
- 1
Your user grants X (Twitter) access once (OAuth) — the token lands in the vault.
- 2
Your agent calls a tool over MCP or the typed API; Open Connector injects the credential server-side.
- 3
Every routed call appends a hash-chained audit record — nothing leaves your infra.
Supported X (Twitter) tools.
165 tools are generated from the published X (Twitter) catalog. Descriptions are plain text; each action remains subject to its configured authentication and tool allowlist.
Showing 165 tools. All published catalog entries are included in this page's server-rendered HTML.
- Activity Stream
- Stream of X Activities
- ActivityStream
- Add members to a Chat group conversation
- Adds one or more members to an existing encrypted Chat group conversation, rotating the conversation key.
- Chat
- Add Conversation Keys
- Adds (initializes or rotates) the encryption keys for a Chat conversation. Call this before sending messages in a new 1:1 conversation, and again with a newer key version to rotate the conversation key. For 1:1 conversations, provide the recipient's user ID as the conversation_id. The server constructs the canonical conversation ID from the authenticated user and recipient. The request body must contain the conversation key version and participant keys (the conversation key encrypted for each participant using their public key). **Workflow (new 1:1 conversation):** 1. Generate a conversation key using the SDK 2. Encrypt the key for both participants using their public keys 3. Call this endpoint to register the keys 4. Send messages using `POST /chat/conversations/{id}/messages` To rotate the keys of an existing conversation, repeat the same call with a newer conversation key version. **Authentication:** - Requires OAuth 1.0a User Context or OAuth 2.0 User Context - Required scopes: `tweet.read`, `users.read`, `dm.write`
- Chat
- Add List member
- Adds a User to a specific List by its ID.
- Lists
- Add public key
- Registers a user's public key for X Chat encryption.
- Chat
- Append Media upload
- Appends data to a Media upload request.
- Media
- Create draft Article
- Creates a new Article draft that can later be published.
- Articles
- Publish Article
- Publishes a draft Article, making it publicly visible.
- Articles
- Block DMs
- Blocks direct messages to or from a specific User by their ID for the authenticated user.
- Users
- Download Chat Media
- Downloads encrypted media bytes from an XChat conversation. The response body contains raw binary bytes. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.
- Chat
- Append Chat Media Upload
- Appends media data to an XChat upload session.
- Chat
- Finalize Chat Media Upload
- Finalizes an XChat media upload session.
- Chat
- Initialize Chat Media Upload
- Initializes an XChat media upload session.
- Chat
- Create subscription
- Creates an Account Activity subscription for the user and the given webhook.
- Account Activity
- Create X activity subscription
- Creates a subscription for an X activity event
- ActivityStream
- Create Chat Group Conversation
- Creates a new encrypted Chat group conversation on behalf of the authenticated user.
- Chat
- Create a Community Note
- Creates a community note endpoint for LLM use case.
- Community Notes
- Create Compliance Job
- Creates a new Compliance Job for the specified job type.
- Compliance
- Create DM message by conversation ID
- Sends a new direct message to a specific conversation by its ID.
- Direct Messages
- Create DM message by participant ID
- Sends a new direct message to a specific participant by their ID.
- Direct Messages
- Create DM conversation
- Initiates a new direct message conversation with specified participants.
- Direct Messages
- Create List
- Creates a new List for the authenticated user.
- Lists
- Create Media metadata
- Creates metadata for a Media file.
- Media
- Create Media subtitles
- Creates subtitles for a specific Media file.
- Media
- Create or Edit Post
- Creates a new Post for the authenticated user, or edits an existing Post when edit_options are provided. Supports paid partnership disclosure via the paid_partnership field.
- Tweets
- Create Bookmark
- Adds a post to the authenticated user’s bookmarks.
- UsersBookmarks
- Create replay job for webhook
- Creates a replay job to retrieve events from up to the past 24 hours for all events delivered or attempted to be delivered to the webhook.
- Webhooks
- Create webhook
- Creates a new webhook configuration.
- Webhooks
- Create stream link
- Creates a link to deliver FilteredStream events to the given webhook.
- WebhooksStream
- Delete subscription
- Deletes an Account Activity subscription for the given webhook and user ID.
- Account Activity
- Deletes X activity subscription
- Deletes a subscription for an X activity event
- Activity
- Delete X activity subscriptions by IDs
- Deletes multiple subscriptions for X activity events by their IDs
- Activity
- Terminate all connections
- Terminates all active streaming connections for the authenticated application.
- Connections
- Delete a Community Note
- Deletes a community note.
- Community Notes
- Terminate connections by endpoint
- Terminates all streaming connections for a specific endpoint ID for the authenticated application.
- Connections
- Terminate multiple connections
- Terminates multiple streaming connections by their UUIDs for the authenticated application.
- Connections
- Delete DM event
- Deletes a specific direct message event by its ID, if owned by the authenticated user.
- Direct Messages
- Delete List
- Deletes a specific List owned by the authenticated user by its ID.
- Lists
- Delete Media subtitles
- Deletes subtitles for a specific Media file.
- Media
- Delete Post
- Deletes a specific Post by its ID, if owned by the authenticated user.
- Tweets
- Delete Bookmark
- Removes a Post from the authenticated user’s Bookmarks by its ID.
- UsersBookmarks
- Delete webhook
- Deletes an existing webhook configuration.
- Webhooks
- Delete stream link
- Deletes a link from FilteredStream events to the given webhook.
- WebhooksStream
- Download DM Media
- Downloads media attached to a legacy Direct Message. The requesting user must be a participant in the conversation containing the specified DM event. The response body contains raw binary bytes.
- Direct Messages
- Evaluate a Community Note
- Endpoint to evaluate a community note.
- Community Notes
- Finalize Media upload
- Finalizes a Media upload request.
- Media
- Follow List
- Causes the authenticated user to follow a specific List by its ID.
- UsersLists
- Follow User
- Causes the authenticated user to follow a specific user by their ID.
- Users
- Get subscription count
- Retrieves a count of currently active Account Activity subscriptions.
- Account Activity
- Get subscriptions
- Retrieves a list of all active subscriptions for a given webhook.
- Account Activity
- Get X activity subscriptions
- Get a list of active subscriptions for XAA
- Activity
- Get Chat Conversation
- Returns metadata for a Chat conversation including type, muted status, and group details. Use chat_conversation.fields to select which fields are returned. Use expansions to hydrate member, admin, or participant user objects. Use user.fields to control which profile fields are returned for expanded users.
- Chat
- Get Chat Conversation Events
- Retrieves messages and key change events for a specific Chat conversation with pagination support. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.
- Chat
- Get Chat Conversations
- Retrieves a list of Chat conversations for the authenticated user's inbox.
- Chat
- Get Community by ID
- Retrieves details of a specific Community by its ID.
- Communities
- Get Compliance Jobs
- Retrieves a list of Compliance Jobs filtered by job type and optional status.
- Compliance
- Get Compliance Job by ID
- Retrieves details of a specific Compliance Job by its ID.
- Compliance
- Get Connection History
- Returns active and historical streaming connections with disconnect reasons for the authenticated application.
- Connections
- Get DM events
- Retrieves a list of recent direct message events across all conversations.
- Direct Messages
- Get DM events for a DM conversation
- Retrieves direct message events for a specific conversation.
- Direct Messages
- Get DM event by ID
- Retrieves details of a specific direct message event by its ID.
- Direct Messages
- Get DM events for a DM conversation
- Retrieves direct message events for a specific conversation.
- Direct Messages
- Get historical Post insights
- Retrieves historical engagement metrics for specified Posts within a defined time range.
- Tweets
- Get 28-hour Post insights
- Retrieves engagement metrics for specified Posts over the last 28 hours.
- Tweets
- Get List by ID
- Retrieves details of a specific List by its ID.
- Lists
- Get List followers
- Retrieves a list of Users who follow a specific List by its ID.
- ListsUsers
- Get List members
- Retrieves a list of Users who are members of a specific List by its ID.
- ListsUsers
- Get List Posts
- Retrieves a list of Posts associated with a specific List by its ID.
- ListsTweets
- Get Media analytics
- Retrieves analytics data for media.
- Media
- Get Media by media key
- Retrieves details of a specific Media file by its media key.
- Media
- Get Media by media keys
- Retrieves details of Media files by their media keys.
- Media
- Get Media upload status
- Retrieves the status of a Media upload by its ID.
- Media
- Get news stories by ID
- Retrieves news story by its ID.
- News
- Get OpenAPI Spec.
- Retrieves the full OpenAPI Specification in JSON format. (See https://github.com/OAI/OpenAPI-Specification/blob/master/README.md)
- General
- Get Post analytics
- Retrieves analytics data for specified Posts within a defined time range.
- Tweets
- Get Post by ID
- Retrieves details of a specific Post by its ID.
- Tweets
- Get Posts by IDs
- Retrieves details of multiple Posts by their IDs.
- Tweets
- Get count of all Posts
- Retrieves the count of Posts matching a search query from the full archive.
- Tweets
- Get count of recent Posts
- Retrieves the count of Posts from the last 7 days matching a search query.
- Tweets
- Get Liking Users
- Retrieves a list of Users who liked a specific Post by its ID.
- TweetsUsers
- Get Quoted Posts
- Retrieves a list of Posts that quote a specific Post by its ID.
- Tweets
- Get Reposted by
- Retrieves a list of Users who reposted a specific Post by its ID.
- TweetsUsers
- Get Reposts
- Retrieves a list of Posts that repost a specific Post by its ID.
- Tweets
- Get stream rule counts
- Retrieves the count of rules in the active rule set for the filtered stream.
- StreamTweets
- Get stream rules
- Retrieves the active rule set or a subset of rules for the filtered stream.
- StreamTweets
- Get Space ticket buyers
- Retrieves a list of Users who purchased tickets to a specific Space by its ID.
- SpacesTweets
- Get Spaces by creator IDs
- Retrieves details of Spaces created by specified User IDs.
- Spaces
- Get space by ID
- Retrieves details of a specific space by its ID.
- Spaces
- Get Spaces by IDs
- Retrieves details of multiple Spaces by their IDs.
- Spaces
- Get Space Posts
- Retrieves a list of Posts shared in a specific Space by its ID.
- SpacesTweets
- Get Trends by WOEID
- Retrieves trending topics for a specific location identified by its WOEID.
- Trends
- Get personalized Trends
- Retrieves personalized trending topics for the authenticated user.
- Trends
- Get usage
- Retrieves usage statistics for Posts over a specified number of days.
- Usage
- Get affiliates
- Retrieves a list of Users who are affiliated with a specific organization User by their ID.
- Users
- Get blocking
- Retrieves a list of Users blocked by the specified User ID.
- Users
- Get Bookmark folders
- Retrieves a list of Bookmark folders created by the authenticated user.
- UsersBookmarks
- Get Bookmarks
- Retrieves a list of Posts bookmarked by the authenticated user.
- UsersBookmarks
- Get Bookmarks by folder ID
- Retrieves Posts in a specific Bookmark folder by its ID for the authenticated user.
- UsersBookmarks
- Get User by ID
- Retrieves details of a specific User by their ID.
- Users
- Get Users by IDs
- Retrieves details of multiple Users by their IDs.
- Users
- Get User by username
- Retrieves details of a specific User by their username.
- Users
- Get Users by usernames
- Retrieves details of multiple Users by their usernames.
- Users
- Get followed Lists
- Retrieves a list of Lists followed by a specific User by their ID.
- UsersLists
- Get followers
- Retrieves a list of Users who follow a specific User by their ID.
- Users
- Get following
- Retrieves a list of Users followed by a specific User by their ID.
- Users
- Get liked Posts
- Retrieves a list of Posts liked by a specific User by their ID.
- UsersTweets
- Get List memberships
- Retrieves a list of Lists that a specific User is a member of by their ID.
- UsersLists
- Get my User
- Retrieves details of the authenticated user.
- Users
- Get mentions
- Retrieves a list of Posts that mention a specific User by their ID.
- UsersTweets
- Get muting
- Retrieves a list of Users muted by the authenticated user.
- Users
- Get owned Lists
- Retrieves a list of Lists owned by a specific User by their ID.
- UsersLists
- Get pinned Lists
- Retrieves a list of Lists pinned by the authenticated user.
- UsersLists
- Get Posts
- Retrieves a list of posts authored by a specific User by their ID.
- UsersTweets
- Get user public keys
- Returns the public keys and Juicebox configuration for the specified user.
- UsersChat
- Get public keys for multiple users
- Returns the public keys and Juicebox configuration for the specified users.
- UsersChat
- Get Reposts of me
- Retrieves a list of Posts that repost content from the authenticated user.
- Users
- Get Timeline
- Retrieves a reverse chronological list of Posts in the authenticated User’s Timeline.
- UsersTweets
- Get webhook
- Get a list of webhook configs associated with a client app.
- Webhooks
- Get stream links
- Get a list of webhook links associated with a filtered stream ruleset.
- WebhooksStream
- Hide reply
- Hides or unhides a reply to a conversation owned by the authenticated user.
- Tweets
- Initialize Chat Group
- Initializes a new XChat group conversation and returns a unique conversation ID. This endpoint is the first step in creating a group chat. The returned conversation_id should be used in subsequent calls to POST /chat/conversations/group to fully create and configure the group with members, admins, encryption keys, and other settings. **Workflow:** 1. Call this endpoint to get a `conversation_id` 2. Use that `conversation_id` when calling `POST /chat/conversations/group` to create the group **Authentication:** - Requires OAuth 1.0a User Context or OAuth 2.0 User Context - Required scope: `dm.write`
- Chat
- Initialize media upload
- Initializes a media upload.
- Media
- Like Post
- Causes the authenticated user to Like a specific Post by its ID.
- UsersTweets
- Mark Conversation as Read
- Marks a specific Chat conversation as read on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.
- Chat
- Upload media
- Uploads a media file for use in posts or other content.
- Media
- Mute User
- Causes the authenticated user to mute a specific User by their ID.
- Users
- Pin List
- Causes the authenticated user to pin a specific List by its ID.
- UsersLists
- Remove List member
- Removes a User from a specific List by its ID and the User’s ID.
- Lists
- Repost Post
- Causes the authenticated user to repost a specific Post by its ID.
- UsersTweets
- Search Communities
- Retrieves a list of Communities matching the specified search query.
- Communities
- Search for Community Notes Written
- Returns all the community notes written by the user.
- Community Notes
- Search for Posts Eligible for Community Notes
- Returns all the posts that are eligible for community notes.
- Community Notes
- Search News
- Retrieves a list of News stories matching the specified search query.
- News
- Search all Posts
- Retrieves Posts from the full archive matching a search query.
- Tweets
- Search recent Posts
- Retrieves Posts from the last 7 days matching a search query.
- Tweets
- Search Spaces
- Retrieves a list of Spaces matching the specified search query.
- Spaces
- Search Users
- Retrieves a list of Users matching a search query.
- Users
- Send Chat Message
- Sends an encrypted message to a specific Chat conversation. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.
- Chat
- Send Typing Indicator
- Sends a typing indicator to a specific Chat conversation on behalf of the authenticated user. For 1:1 conversations, provide the recipient's user ID; the server constructs the canonical conversation ID from the authenticated user and recipient.
- Chat
- Stream Post labels
- Streams all labeling events applied to Posts.
- StreamCompliance
- Stream Likes compliance data
- Streams all compliance data related to Likes for Users.
- StreamCompliance
- Stream all Likes
- Streams all public Likes in real-time.
- StreamLikes
- Stream sampled Likes
- Streams a 10% sample of public Likes in real-time.
- StreamLikes
- Stream filtered Posts
- Streams Posts in real-time matching the active rule set.
- StreamTweets
- Stream Posts compliance data
- Streams all compliance data related to Posts.
- StreamCompliance
- Stream all Posts
- Streams all public Posts in real-time.
- StreamTweets
- Stream English Posts
- Streams all public English-language Posts in real-time.
- StreamTweets
- Stream Japanese Posts
- Streams all public Japanese-language Posts in real-time.
- StreamTweets
- Stream Korean Posts
- Streams all public Korean-language Posts in real-time.
- StreamTweets
- Stream Portuguese Posts
- Streams all public Portuguese-language Posts in real-time.
- StreamTweets
- Stream sampled Posts
- Streams a 1% sample of public Posts in real-time.
- StreamTweets
- Stream 10% sampled Posts
- Streams a 10% sample of public Posts in real-time.
- StreamTweets
- Stream Users compliance data
- Streams all compliance data related to Users.
- StreamCompliance
- Unblock DMs
- Unblocks direct messages to or from a specific User by their ID for the authenticated user.
- Users
- Unfollow List
- Causes the authenticated user to unfollow a specific List by its ID.
- UsersLists
- Unfollow User
- Causes the authenticated user to unfollow a specific user by their ID.
- Users
- Unlike Post
- Causes the authenticated user to Unlike a specific Post by its ID.
- UsersTweets
- Unmute User
- Causes the authenticated user to unmute a specific user by their ID.
- Users
- Unpin List
- Causes the authenticated user to unpin a specific List by its ID.
- UsersLists
- Unrepost Post
- Causes the authenticated user to unrepost a specific Post by its ID.
- UsersTweets
- Update X activity subscription
- Updates a subscription for an X activity event
- Activity
- Update List
- Updates the details of a specific List owned by the authenticated user by its ID.
- Lists
- Update stream rules
- Adds or deletes rules from the active rule set for the filtered stream.
- StreamTweets
- Validate subscription
- Checks a user’s Account Activity subscription for a given webhook.
- Account Activity
- Validate webhook
- Triggers a CRC check for a given webhook.
- Webhooks
X (Twitter) integration, answered
- How do AI agents use X (Twitter) through Open Connector?
- Your user connects X once (OAuth). Open Connector stores the token in an encrypted vault and exposes X tools to your agent over MCP or a typed API. The agent calls a tool and Open Connector injects the credential server-side.
- Can I automate social workflows with this integration?
- Yes, after the user grants the required OAuth scopes. Open Connector keeps credentials in your infrastructure, audits each routed call, and routes actions by your allowlist.
- Where do X OAuth tokens live?
- In your own infrastructure: encrypted token storage with server-side credential injection and no raw token exposure to the agent.
Give your agents X (Twitter) — keep the keys.
Open source, self-hostable, with X (Twitter) credentials that never leave your infrastructure. Run it from source today.