Get Posts By Ids
twitter.get_posts
ActionChat & messagingconnection required
Calls the X (Twitter) API with the connection's credentials.
Look up to 100 posts up in one call, by their ids.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- Bearer token
- Providers
- X (Twitter)
- Secret shape
- the X OAuth2 user-context access token, or {"access_token": "…"}
- Resolved by
- config.connection_id, else node.connection_id
Configuration
7 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
ids Post ids, as a JSON array or comma-separated. At most 100. | array | Yes | — | ≥ 1 characters; array of string | ["1460323737035677698"] |
post_fields Comma-separated Post fields to include, e.g. created_at,public_metrics,author_id. Without this X returns only id and text. | string | No | — | — | — |
expansions Comma-separated expansions to resolve into 'includes', e.g. author_id,attachments.media_keys. | string | No | — | — | — |
user_fields Comma-separated User fields to include, e.g. created_at,description,public_metrics. Without this X returns only id, name and username. | string | No | — | — | — |
media_fields Comma-separated Media fields for expanded media, e.g. url,alt_text,type. | string | No | — | — | — |
poll_fields Comma-separated Poll fields for an expanded poll, e.g. options,end_datetime. | string | No | — | — | — |
place_fields Comma-separated Place fields for an expanded geo.place_id, e.g. full_name,country. | string | No | — | — | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"ids": [
"1460323737035677698"
]
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
posts The Post objects on this page. | array | — |
count How many posts this page carried. | number | — |
next_token Cursor for the next page; empty on the last one. | string | — |
result_count The result count X reported in meta. | number | — |
includes Objects pulled in by 'expansions' — users, media, polls, places. Empty when none asked for. | object | — |
errors Per-id problems — a deleted or protected post lands here. | array | — |
{
"count": 0,
"errors": [],
"includes": {},
"next_token": "",
"posts": [],
"result_count": 0
}Notes
- X API access is tiered and metered: most read endpoints need a paid plan, and since 6 February 2026 new developers get pay-per-use credits rather than a free tier. A 403 here usually means the plan, not the code.
- The connection's access token must already carry the scopes this node needs; X does not grant them per call, so a missing scope is a 401 on every run.
- Needs the OAuth2 scopes tweet.read, users.read.
- An id X cannot serve does not fail the call: it comes back in 'errors' while the rest of the batch succeeds.
See Get Posts By Ids run in a workflow.
In a technical demo we add the X (Twitter) connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.