Use local Codex credentials to check rate-limit reset…
Paste tAWf5ZMe · Public and searchable. Times use the creator timezone (UTC).
Use local Codex credentials to check rate-limit reset credits. Read only `tokens.access_token` from `~/.codex/auth.json`, then make a GET request to: `https://chatgpt.com/backend-api/wham/rate-limit-reset-credits` Use PowerShell with `.NET HttpClient`, and explicitly load the assembly first: `Add-Type -AssemblyName System.Net.Http` Use the header: `Authorization: Bearer <access_token>` Response shape: - Top-level object has `credits` - Each reset card is in `credits[]` - Issued time is `granted_at` - Expiry time is `expires_at` Requirements: 1. If the endpoint returns HTTP 401, output exactly: `401 Unauthorized: the credential is invalid or the Authorization header is missing.` 2. Never print `access_token`, `refresh_token`, cookies, raw response bodies, URLs containing unique IDs, or full unique IDs. 3. Only show each reset card’s issued time and expiry time. 4. Convert timestamps from UTC to Singapore time, formatted as: `yyyy-MM-dd HH:mm:ss +08:00` 5. Do not inspect or print unrelated fields such as `id`, `profile_user_id`, `title`, `description`, or image URLs. 6. In Windows PowerShell, load `System.Net.Http` before constructing HttpClient: `Add-Type -AssemblyName System.Net.Http`