---
title: "X get user posts API: GET /2/users/{id}/tweets"
description: "When PubNio calls X's get user posts request, GET /2/users/{id}/tweets: the scopes it needs, the errors PubNio handles for it, and its pinned spec revision."
---

> Documentation Index
> Fetch the complete documentation index at: https://pubnio.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# X get user posts API: GET /2/users/{id}/tweets

PubNio calls X's `GET /2/users/{id}/tweets` (`getUsersPosts`) to total an X account's engagement over a date range.

## How PubNio calls it

- Account analytics: the account sync makes this call; [`GET /api/v1/workspaces/{workspaceId}/analytics/accounts/{accountId}`](https://pubnio.com/api/v1/docs#tag/analytics/GET/api/v1/workspaces/{workspaceId}/analytics/accounts/{accountId}) returns what it stored.
- PubNio pages through the account's posts 100 at a time with `start_time` and `end_time` set to the whole days of the range, and sums likes, replies, reposts, and the other public metrics.
- Impressions and clicks come from `non_public_metrics`, which X stops returning about 30 days after a post; past that, those account metrics read as unsupported, not zero.

## Scopes

- The pinned spec lists 2 scopes, all required: `tweet.read` and `users.read`.
- PubNio's X sign-in requests every one of them.
- Before the account 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](https://pubnio.com/docs/errors/providers/) covers the providers that have them.

## Spec and changes

`getUsersPosts` in the pinned spec, revision `2.175`.

Checked weekly; no change to `GET /2/users/{id}/tweets` recorded since this revision. [Change tracker](https://pubnio.com/docs/changes/).

## Limits

- PubNio keeps 366 days of X history and does not read further back.

## Sources

- [X API v2 OpenAPI document](https://api.x.com/2/openapi.json)

## Related

- [Provider API operations PubNio calls](https://pubnio.com/docs/providers/operations/)
- [X rate limits and quota](https://pubnio.com/docs/providers/x/quota/)

Source: https://pubnio.com/docs/providers/x/operations/get-users-posts/index.mdx
