Skip to content
Search documentation/

Authentication failed

invalid_tokenHTTP 401Retry with a new token

What happened

The bearer token is missing, invalid or expired. Nothing was done.

What to do next

Get a new access token from POST /oauth/token, then repeat the request with the same Idempotency-Key.

Can you retry?

Retry with a new token. Get a new access token from POST /oauth/token, then repeat the identical request with the same Idempotency-Key and body. retry: after_new_token

Who acts

You: the software that sent the request. who_acts: caller

Don't

  • Don't retry with a new Idempotency-Key; a new key is a new request. change_idempotency_key

Example response

Sent as application/problem+json. The detail describes the particular request; keep request_id for support.

{
  "type": "https://docs.perionpayments.com/problems/invalid-token",
  "title": "Authentication failed",
  "status": 401,
  "code": "invalid_token",
  "detail": "The bearer token is missing, invalid or expired. Nothing was done.",
  "request_id": "req_8YkQ2rL0ZtW4",
  "retryable": true,
  "retry": "after_new_token",
  "who_acts": "caller",
  "next_step": "Get a new access token from POST /oauth/token, then repeat the request with the same Idempotency-Key.",
  "do_not": [
    "change_idempotency_key"
  ]
}

All problem codes · Reading problem responses