Skip to main content

unauthorized

HTTP Status: 401 Unauthorized

Example response

What happened?

The API could not authenticate your request. This happens when:
  • No Authorization header is present
  • The header format is wrong (not Bearer <key>)
  • The API key doesn’t match any active key in the system
  • The API key has been revoked or deactivated

How to fix

  1. Add the Authorization header with the Bearer scheme:
  2. Check your key: Make sure you’re using the complete key, including the avat_live_ prefix
  3. Generate a new key if you’ve lost your original. Keys are stored as SHA-256 hashes and cannot be recovered

Common mistakes

  • Missing Bearer prefix: Authorization: avat_live_xxx won’t work, it must be Authorization: Bearer avat_live_xxx
  • Extra whitespace: Check for trailing spaces or newlines in your key
  • Using a revoked key: If you’ve regenerated your key, the old one no longer works
  • Environment mismatch: Make sure you’re using the right key for the right environment

Catching this error with the SDKs