api request_error ai_generated true

HTTP 400:分页令牌已过期或无效

HTTP 400: Pagination token expired or invalid

ID: api/rest-api-pagination-token-expired

其他格式: JSON · Markdown 中文 · English
88%修复率
83%置信度
1证据数
2024-03-10首次发现

版本兼容性

版本状态引入弃用备注
REST API v3.0 active
cursor-based pagination active
Twitter API v2 active

根因分析

API 请求中使用的分页游标或令牌已过期,或为不同查询上下文生成,导致服务器拒绝。

English

The pagination cursor or token used in the API request has expired or was generated for a different query context, causing the server to reject it.

generic

官方文档

https://developer.twitter.com/en/docs/twitter-api/pagination

解决方案

  1. Restart pagination from the beginning by omitting the cursor parameter.
  2. Cache the initial request and re-fetch from scratch if token expires.

无效尝试

常见但无效的做法:

  1. 90% 失败

    The token is already expired; waiting will not revive it.

  2. 95% 失败

    Tokens are opaque and server-generated; manual modification breaks integrity checks.

  3. 60% 失败

    Some APIs do not support offset pagination; this may not be an option.