api
request_error
ai_generated
true
HTTP 400:分页令牌已过期或无效
HTTP 400: Pagination token expired or invalid
ID: api/rest-api-pagination-token-expired
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.
官方文档
https://developer.twitter.com/en/docs/twitter-api/pagination解决方案
-
Restart pagination from the beginning by omitting the cursor parameter.
-
Cache the initial request and re-fetch from scratch if token expires.
无效尝试
常见但无效的做法:
-
90% 失败
The token is already expired; waiting will not revive it.
-
95% 失败
Tokens are opaque and server-generated; manual modification breaks integrity checks.
-
60% 失败
Some APIs do not support offset pagination; this may not be an option.