X
Post to X with media, replies and quotes; read posts, timelines and recent search; like and repost as the connected account.
Connect an X account to post and engage: publish posts with up to four uploaded images or a video, reply, quote, and delete; read a post, an account's recent timeline, or search the last seven days; like, unlike, repost and undo a repost. X charges every call to the developer account's credits, and a refusal for credits or API access says so rather than failing as though something were misconfigured.
Connect
| Credential field | Required | Where it comes from |
|---|---|---|
API key (API_KEY) | Yes | Your X app's API Key (the consumer key), from the app's Keys and tokens page. |
API key secret (API_KEY_SECRET) | Yes | Your X app's API Key Secret. Shown once when the keys are created or regenerated. |
Access token (ACCESS_TOKEN) | Yes | The Access Token for the ACCOUNT that will post - a different value from the API key. Regenerate it after changing the app's permissions, or writes will keep failing. |
Access token secret (ACCESS_TOKEN_SECRET) | Yes | The Access Token Secret that pairs with the access token above. |
Tools
| Tool | Access | What it does |
|---|---|---|
Get me (yekar.x.get-me) | Read | The X account these keys act as: id, handle, display name, bio and follower counts. Worth calling first when anything is failing - it is open to every app, including ones still on an old Free plan, so a failure here is an authentication problem (or an account out of credits, which the message says), while a failure elsewhere with this working is almost always an API-access problem. |
Get user (yekar.x.get-user) | Read | Look up an account by handle and get its numeric id, bio and follower counts. The id is what List user posts needs. Charged to the developer account's X credits; an app still on an old Free plan cannot use it, and the refusal says so explicitly rather than looking like a permission problem. |
Create post (yekar.x.create-post) | Write | Post to X, optionally as a reply, as a quote of another post, or with up to 4 uploaded media attachments. It goes live immediately - X's API has no scheduling, so a scheduled post is a scheduled automation. X refuses text identical to something recently posted, so a retry with unchanged wording fails as a duplicate rather than posting twice. Standard accounts are capped at 280 characters. |
Delete post (yekar.x.delete-post) | Write | Permanently delete one of the connected account's own posts. There is no undo, and deleting a post that started a thread orphans the replies rather than removing them. X reports the outcome as a boolean, which this passes through unchanged rather than assuming success. |
Get post (yekar.x.get-post) | Read | Read one post: its text, author, timestamp and public metrics. Impressions appear only for the connected account's own posts and only on some tiers - a null there means X did not report the number, not that nobody saw it. Requires a PAID access tier. A deleted post, a protected account and a suspended account are all reported identically by X as 'not found'. |
List user posts (yekar.x.list-user-posts) | Read | A page of an account's recent posts, newest first. X's timeline endpoint reaches back roughly 3,200 posts and no further, so this is recent history rather than an archive, and it publishes no total. Charged to the developer account's X credits per post returned. Omit the user id to read the connected account's own posts. |
Search posts (yekar.x.search-posts) | Read | Search recent public posts. TWO limits worth knowing before relying on this: it reaches back only 7 DAYS (the full archive is a separate, more expensive endpoint that is not offered here), and each post returned is charged to the developer account's X credits - an app still on an old Free plan is refused with an API-access error rather than an empty result. There is no result total; X returns a page and a token. |
Like post (yekar.x.like-post) | Write | Like a post as the connected account. Likes are public on X, so this is a visible endorsement from the account, not a private bookmark. Liking something already liked is accepted and changes nothing. |
Unlike post (yekar.x.unlike-post) | Write | Remove the connected account's like from a post. Unliking something that was never liked is accepted and changes nothing. |
Repost (yekar.x.repost) | Write | Repost someone else's post to the connected account's timeline - a plain repost with no commentary. To add commentary, use Create post with quotePostId instead, which is a different act: a quote is your own post and reads as your words. |
Undo repost (yekar.x.undo-repost) | Write | Remove the connected account's repost of a post. Undoing a repost that was never made is accepted and changes nothing. This does not delete a QUOTE post - a quote is your own post, and Delete post removes that. |
Upload media (yekar.x.upload-media) | Write | Upload an image, GIF or short video and return the media id for Create post. Unlike Facebook and Instagram, X does NOT fetch media from a URL - the bytes must be uploaded - so this tool downloads the URL you give it and forwards the file. An uploaded media id is unattached until a post uses it, and X discards it after a short while, so upload immediately before posting rather than ahead of time. Files above 5 MB need X's chunked upload, which this integration does not implement. |
Notes
- Create a project and an app at developer.x.com. The app MUST be attached to a Project - a standalone app is refused by every v2 endpoint.
- Under the app's User authentication settings, turn on OAuth 1.0a and set App permissions to Read and Write (Read and write and Direct message is not needed here).
- On the Keys and tokens page, copy FOUR values: the API Key and API Key Secret (the app's), and the Access Token and Access Token Secret (your account's - click Generate if there are none). These do not expire.
- If you change the app's permissions later, you MUST regenerate the access token and secret. The old pair keeps the old permission silently, and writes fail with an authentication error that looks like a bad key.
- X's API is pay-per-use: buy credits for the developer account in the X Developer Console before connecting. Every call - posts, likes and reads alike - is charged to it, and when the credits run out X refuses calls until more are added. No connection setting can fix that.
- There is no scheduling in X's API. Create post publishes immediately - schedule the automation instead.
- X refuses text identical to something recently posted, so a retry with unchanged wording fails as a duplicate rather than posting twice.
- Media is uploaded, not fetched: run Upload media first and pass the id to Create post. X discards an unattached upload after a short while, so upload immediately before posting. Files above 5 MB are not supported here.
- Search reaches back 7 DAYS only. The full archive is a separate, much more expensive endpoint and is not offered by this integration.
- Everything acts as the ONE account these keys belong to, never as the person who triggered the automation - and likes and reposts are public endorsements from it. Bind automations using it as a service connection.