> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opengame.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> The OpenGame API's JSON error body, its retry field, and the failures you are most likely to meet, with what each one means and what to do.

Creator API errors are JSON. Branch on `error` and show `message`.

```json theme={"system"}
{
  "error": "sign_in_required",
  "message": "Sign in to continue.",
  "retry": "after-fix"
}
```

| Field | Meaning |
| - | - |
| `error` | A stable code. |
| `message` | A sentence you can show. |
| `retry` | `now`, `after-fix`, `later` or `never`. |
| `retryAfterSeconds` | How long to wait, on a rate limit or a 503 that can say. |
| `url` | The page where the fix happens, such as settings. |
| `token` | The token the error is about, by `id` and `name`. Never its secret. |
| `requestId` | Present when the server logged the failure. Quote it if you report one. |

A method a route does not take, such as `DELETE` on `/api/v1/limits`, gets 405 with no JSON body. Check the status before you parse.

## Codes you will meet

| Code | Status | What to do |
| - | - | - |
| `not_found` | 404 | Check the path against the resource page. |
| `not_launched` | 403 | The creator API is closed to this caller. Every signed-in account may use it, so sign in, or run `opengame login`, and try again. [Check status](https://docs.opengame.io/api-reference/introduction.md#check-status) shows what the server says about your account. |
| `uploads_closed` | 403 | OpenGame is not taking uploads from this account. Your login and your games still work. `retry` is `later`. |
| `entries_closed` | 403 | Entries have closed, so no game can be deployed or updated. Published games stay live. `retry` is `never`. |
| `not_member` | 403 | This account does not have creator access. |
| `account_inactive` | 403 | The account is suspended or deleted. |
| `sign_in_required` | 401 | Send a creator token. |
| `token_invalid` | 401 | The token is wrong, or a login lapsed. Run `opengame login`. |
| `token_revoked` | 401 | The token was revoked. Create another. |
| `insufficient_scope` | 403 | The token is valid and lacks the scope this route needs. Create a token with that scope. |
| `forbidden` | 403 | The credential cannot read or change this game or deploy. Sign in as its owner. |
| `deploy_rate_limited` | 429 | The hourly deploy allowance is used. Wait `retryAfterSeconds`. |
| `deploy_day_limited` | 429 | The account has started 5 deploys in the last 24 hours. Nothing was uploaded. Wait `retryAfterSeconds`. |

Each resource page lists the codes that route can return.

## Device login

`POST /api/v1/auth/token` answers a pending or ended approval with `error` set to `authorization_pending`, `slow_down`, `expired_token` or `access_denied`.

* `slow_down` from polling too often also includes `interval`, the seconds to wait between polls.
* `slow_down` because too many requests came from one place has status 429 and a `message`.
* `access_denied` that was not a person pressing Deny has a `reason`: `not_member` or `account_inactive`.

## Recover from a deploy

| Situation | Recovery |
| - | - |
| The request that created the deploy timed out | Repeat it with the same `Idempotency-Key`. |
| The storage upload stopped | Ask for a fresh upload URL for the same operation. |
| A file upload stopped | Read `GET /api/v1/operations/{id}/files` again from the start, following `nextCursor`. Each page names the files still missing, with fresh URLs once the old ones have expired. |
| Checks are still running | Poll the same operation, or run `opengame status --watch`. |
| `upload_expired` | Start a new deploy with a new `Idempotency-Key`. |
| A rate limit | Wait for `retryAfterSeconds`, then try again. |
| A game finding | Apply the fix, check it locally, and deploy a new release. |

Deploys are limited to 30 an hour per account and per token, and to 5 per account in any 24 hours. `opengame limits --json` reads the current limits and what you have left.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.