INVALID_API_KEY or AUTHENTICATION_REQUIRED: the API key is missing or invalid
Checked on 2026-11-25 against the SharkPOS API code · Markdown
INVALID_API_KEY · HTTP 401
Message you may see:
La credencial del emisor es inválida o está inactiva. (The issuer's credential is invalid or inactive.)La credencial del emisor tiene un formato inválido. (The issuer's credential has an invalid format.)Credencial de API requerida. (API credential required.)
What it means
The request does not carry Authorization: Bearer <API_KEY> (AUTHENTICATION_REQUIRED) or the key does not exist, is malformed or was revoked (INVALID_API_KEY).
Why it happens
- You use a sandbox key against production, or the other way around: they are different environments.
- The environment variable was not loaded and an empty value is sent.
- The word
Beareris missing or there is an extra space or line break from copying the key. - The key was revoked from the dashboard.
How to fix it
- Check the base URL: sandbox
https://sandbox.sharkpos.cl, productionhttps://api.sharkpos.cl. - Send the exact header
Authorization: Bearer <API_KEY>. - If you lost it, create another: it is stored as a hash and cannot be recovered.
Should you retry? Not until the key is fixed.
All API errors are JSON: {"status": "error", "code": "...", "message": "...", "solution": "..."}. The code is stable; message and solution are in Spanish. Full table in the guide for agents.
Related
Integrating receipts or invoices? Try it in the sandbox, without touching the real SII.
Try it today in the sandbox
Get a sandbox API key: a test company with certificate and folios already loaded and a simulated SII. When you are ready, each RUT costs CLP 5,990 a month (VAT included) with 20,000 documents a month.