Skip to content

X get post by ID API: GET /2/tweets/{id}

When PubNio calls X's get post by ID request, GET /2/tweets/{id}: the scopes it needs, the errors PubNio handles for it, and its pinned spec revision.

PubNio calls X’s GET /2/tweets/{id} (getPostsById) to confirm a delivered post exists and read its metrics.

How PubNio calls it

  • Confirming a delivery: PubNio reads the result back after the write, and again when POST /api/v1/posts/{postId}/targets/{targetId}/reconcile rechecks an unresolved delivery.
  • Post analytics: the analytics sync makes this call for published posts; POST /api/v1/analytics/refreshes asks for an early read.
  • To confirm, PubNio reads the root post’s ID only. Any error or a missing post leaves the delivery pending rather than failed.
  • For analytics, PubNio asks for non_public_metrics and organic_metrics only during the first 30 days after the post, and for public_metrics after that.

Scopes

  • The pinned spec lists 2 scopes, all required: users.read and tweet.read.
  • PubNio’s X sign-in requests every one of them.
  • Before the post analytics sync makes this call, PubNio checks that the account granted tweet.read and users.read.

Errors

PubNio has no X error code pages yet. Provider error codes covers the providers that have them.

Spec and changes

getPostsById in the pinned spec, revision 2.175.

Checked weekly; no change to GET /2/tweets/{id} recorded since this revision. Change tracker.

Limits

  • An X Article draft is never read back: the draft receipt confirms itself with the link to X’s Articles workspace.

Sources

Type to search…

↑↓ navigate↵ selectEsc close