Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,29 @@ To subscribe to updates, please [**“Turn on notifications”**](https://help.x
- **Java XDK (`com.x:xdk:0.4.0`):** Lowered minimum JVM version to Java 8 with an Apache HttpClient 5 default transport supporting full streaming and idle-timeout recovery on Java 8+. See [Java XDK](/xdks/java/overview).
</Update>

<Update label="Dec 2, 2026" description="X API v2">
### Structured error fields on `403`, `402`, and usage-cap `429` responses

X API v2 auth, billing, and usage-cap errors now include machine-readable RFC 7807 extension fields alongside existing `type`, `title`, `detail`, and `status` fields so clients and SDKs can handle failures programmatically without parsing error text:

- **`403 Missing OAuth2 Scopes` (`.../missing-scopes`):** Includes `"missing_scopes": [...]` listing each scope required by the endpoint that is absent from the token.
- **`403 Unsupported Authentication` (`.../unsupported-authentication`):** Includes `"provided_auth_type"` and `"supported_auth_types": [...]`.
- **`429 Usage Capped` (`.../usage-capped`):** Includes `"used"` and `"cap"` counts alongside an enriched `detail` message.
- **`402 Payment Required` (`.../credits-depleted`):** Includes `"billing_url": "https://console.x.com"`.

No request changes are needed. See [Response Codes & Errors](/x-api/fundamentals/response-codes-and-errors#error-types).
</Update>

<Update label="Dec 2, 2026" description="Developer Console">
### Spend pace forecasting and credit runway guardrails

The [Developer Console](https://console.x.com) Credits page now surfaces live spend-pace forecasting and low-runway warnings for Pay-Per-Use accounts:

- **Daily burn rate and cycle projection:** Once at least 24 hours have elapsed in your current billing cycle, the Spend cap section shows your daily pace and projected end-of-cycle spend (including when no spend cap is set).
- **Early spend-cap warning:** When your current pace is projected to exceed your billing-cycle spend cap before the cycle ends, an amber notice highlights the estimated date you will reach the cap.
- **Credit runway guardrail:** When auto-recharge is inactive and your remaining balance covers 14 days or fewer at your current burn rate, a warning badge appears beneath your remaining balance.
</Update>

<Update label="Dec 1, 2026" description="X API v2">
### `x-request-id`, `Retry-After`, and actionable `429` error details

Expand Down
13 changes: 11 additions & 2 deletions x-api/fundamentals/response-codes-and-errors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ Additional fields may be present depending on the error type.
| `.../resource-not-found` | Post, user, or other resource doesn't exist |
| `.../not-authorized-for-resource` | No access to private/protected content, or request blocked by account IP allowlist |
| `.../client-forbidden` | App not enrolled or lacks required access |
| `.../usage-capped` | Usage cap exceeded |
| `.../missing-scopes` | OAuth 2.0 user token is missing one or more required scopes (`missing_scopes` array lists each missing scope) |
| `.../unsupported-authentication` | Authentication type is not permitted for this endpoint (`provided_auth_type` and `supported_auth_types` list what was sent vs accepted) |
| `.../credits-depleted` | Account credit balance is depleted (`402 Payment Required`, includes `billing_url`) |
| `.../usage-capped` | Monthly usage cap exceeded (`429 Too Many Requests`, includes `used` and `cap`) |
| `.../rate-limit-exceeded` | Rate limit exceeded |
| `.../streaming-connection` | Stream connection problem |
| `.../rule-cap` | Too many filtered stream rules |
Expand Down Expand Up @@ -127,11 +130,17 @@ This happens when requesting multiple resources and some are unavailable.
**Check your access:**
- Verify your app has access to this endpoint
- Some endpoints require specific enrollment or approval
- User-context endpoints need appropriate OAuth scopes
- **Missing OAuth 2.0 scopes** (`.../missing-scopes`): Inspect the structured `missing_scopes` array in the JSON response to see the exact scopes to request during authorization
- **Unsupported authentication** (`.../unsupported-authentication`): Inspect `provided_auth_type` and `supported_auth_types` in the JSON response to see which authentication methods the endpoint accepts on your plan
- The resource may be private or protected
- If the response body has `"type": "https://api.x.com/2/problems/not-authorized-for-resource"` and `"detail": "client IP not allowed: <ip>"` (or `"client IP not allowed"`), your developer account has an active [IP allowlist](/fundamentals/ip-allowlist) that does not cover the request's egress IP. Check the IP reported in `detail`, add it (or its CIDR block) under **Developer Console → Settings → IP allowlist** as an account Administrator, and allow a few seconds to a few minutes for propagation. Note that IPv4 and IPv6 blocks match only their own address family.
</Accordion>

<Accordion title="402 Payment Required">
**Credits depleted (`.../credits-depleted`):**
- Your Pay-Per-Use credit balance has reached zero. Top up credits or enable auto-recharge at the `billing_url` returned in the response (`https://console.x.com`).
</Accordion>

<Accordion title="429 Too Many Requests">
**Rate limited:**
- Wait for the duration in the `retry-after` response header (covers 1-second, 15-minute, and 24-hour limits without clock skew), or fall back to `x-rate-limit-reset`
Expand Down
Loading