NowgateDocs

api_key_wrong_environment

The API key belongs to the other environment.

On this page

HTTP status: 401 Unauthorized. Retrying the same request unchanged fails the same way.

Why it happens

  • A sandbox key (ngk_sandbox_…) was sent to the live API, or a live key (ngk_live_…) to the sandbox.

What to do

Use live keys with api.nowgate.io and sandbox keys with sandbox-api.nowgate.io.

Example

The response is application/problem+json. Branch on code, never on title or detail. See errors for the format.

{
  "type": "https://docs.nowgate.io/errors/api_key_wrong_environment",
  "title": "Unauthorized",
  "status": 401,
  "detail": "What exactly was wrong, in a sentence.",
  "instance": "/v1/payments",
  "code": "api_key_wrong_environment",
  "request_id": "req_01jc3xb1n6f0q2w8e4r7t5y9v3"
}