api
request_error
ai_generated
true
HTTP 400: Pagination token expired or invalid
ID: api/rest-api-pagination-token-expired
88%Fix Rate
83%Confidence
1Evidence
2024-03-10First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| REST API v3.0 | active | — | — | — |
| cursor-based pagination | active | — | — | — |
| Twitter API v2 | active | — | — | — |
Root Cause
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中文
API 请求中使用的分页游标或令牌已过期,或为不同查询上下文生成,导致服务器拒绝。
Official Documentation
https://developer.twitter.com/en/docs/twitter-api/paginationWorkarounds
-
90% success Restart pagination from the beginning by omitting the cursor parameter.
Restart pagination from the beginning by omitting the cursor parameter.
-
85% success Cache the initial request and re-fetch from scratch if token expires.
Cache the initial request and re-fetch from scratch if token expires.
中文步骤
Restart pagination from the beginning by omitting the cursor parameter.
Cache the initial request and re-fetch from scratch if token expires.
Dead Ends
Common approaches that don't work:
-
90% fail
The token is already expired; waiting will not revive it.
-
95% fail
Tokens are opaque and server-generated; manual modification breaks integrity checks.
-
60% fail
Some APIs do not support offset pagination; this may not be an option.