エラー
REST APIは標準のHTTPステータスコードを使用し、JSONエラーボディを返します:
{ "error": "unauthorized", "message": "Missing or invalid API key" }
# ステータスコード
| Status | error |
When |
|---|---|---|
400 |
invalid-argument |
Malformed body or a missing required field. |
401 |
unauthorized |
Missing, invalid, or revoked API key. |
403 |
forbidden / failed-precondition |
Beyond your plan’s entitlement (e.g. minting serialized codes without Enterprise, or over a quota). The limit is in the message. |
404 |
not-found |
No link/campaign/job with that id, or not owned by your account. |
429 |
rate-limited |
Per-key rate limit exceeded — back off and retry. |
5xx |
internal |
Something went wrong our end; safe to retry idempotent reads. |
# 所有権
すべての読み取りと書き込みは、APIキーが解決するアカウントにスコープされています。別のアカウントのリンクまたはキャンペーンをリクエストすると、403ではなく404が返されます。そのアカウントが存在することを明かしません。
# 非同期ジョブ
Batchおよびserialized mintジョブはリクエストを受け入れ(200、queued)、その後、元のHTTPレスポンスではなくジョブステータス(status: "failed"と理由)で失敗をサーフェスします。常にジョブをポーリングしてください。
# 検証
パブリックverificationエンドポイントは、不明なシリアルに対してエラーを返すことはありません。status: "unknown"を返します(偽造またはまだ発行されていないコードは、404ではなく意味のある回答です)。
# 次へ
- Authentication · the full API reference.