OriginChainDB
Errors

401 - missing Authorization header

← Errors examples

What happened

The endpoint did not receive an Authorization bearer header. This is different from an expired token.

Send the missing access credentialCheck both the client and any proxy that forwards its request.
  1. Load the credentialRead the token from your configured secret source.
  2. Attach AuthorizationSend Bearer followed by the token.
  3. Check forwarding and accessEnsure the header reaches the API and inspect the response.

Request that triggers it

A request that omits the Authorization header entirely.

curl -X POST "https://$OC_HOST/v1/tenants/$OC_TENANT/sql" \
  -H "Content-Type: application/json" \
  -d '{"sql": "SELECT id FROM shop.products LIMIT 1"}'

Read the response

{
  "error": "unauthorized",
  "message": "missing Authorization header",
  "retry": false
}

Fix the request

  1. Confirm the application loaded its secret.
  2. Set Authorization: Bearer followed by that token.
  3. Check that a proxy forwards the header.
  4. Retry the corrected request.

Keep in mind: Use the constructor and environment rules for your installed SDK version; do not assume all clients load OC_TOKEN automatically.

Common causes

  • Token env var unset in CI - the script silently sent an empty value, which the proxy stripped.
  • A reverse proxy or sidecar dropping the Authorization header on forward.
  • Calling through a CDN cache that wasn't configured to forward auth headers.
  • Pasted cURL from a docs page that didn't include the auth line.
  • Frontend code that forgot to attach the token to fetch options.

Continue

See error handling and retries, or return to error examples.

© 2026 Silicoyn Technologies Pvt Ltd

On this page