Error codes · Keys and signatures
Invalid credentials
Code
invalid_credentialsStatus401
If this was an orderThis request bought nothing
Send it again unchanged?No — change something first
.NET SDK
InvalidCredentialsExceptionWhat it means
Anis could not authenticate the call: the key id is unknown, the key is not active (not yet confirmed, revoked or expired), the signature does not match the request, the signature is too old or signed on a clock that is out, or the body does not match its Content-Digest. All of these get this same answer on purpose, so a refusal never tells anyone which one to work around.
What to do
- Check that the key id and the private key you sign with belong together.
- Check that the key is active: the enrolment status reports
activeonce Anis staff confirm it. - Check your server clock, and sign each attempt afresh — never reuse an old signature.
- Compute the
Content-Digestover the exact bytes you send. - Run the signature self-check: it reports exactly what Anis saw. If the self-check is refused too, the key itself is the problem.
Where you can meet it
- GETRead your profile
/v1/profile - GETList wallets
/v1/wallets - GETRead a wallet
/v1/wallets/{walletId} - GETList catalogue categories
/v1/wallets/{walletId}/catalog/categories - GETList subcategories of a category
/v1/wallets/{walletId}/catalog/categories/{categoryId}/subcategories - GETRead a subcategory
/v1/wallets/{walletId}/catalog/subcategories/{subcategoryId} - GETList cards for sale
/v1/wallets/{walletId}/catalog/subcategories/{subcategoryId}/cards - POSTPlace an order
/v1/wallets/{walletId}/orders - GETRead an order
/v1/orders/{operationId} - GETList owned cards
/v1/wallets/{walletId}/cards - GETRead an owned card
/v1/wallets/{walletId}/cards/{soldCardId} - POSTReveal a card
/v1/wallets/{walletId}/cards/{soldCardId}/reveal - POSTReveal an invoice
/v1/wallets/{walletId}/invoices/{invoiceId}/cards/reveal - POSTCheck your signature
/v1/diagnostics/signature
Example
The body of the refusal. Its type is the address of this page.
{
"type": "https://developers.anis.ly/errors/invalid-credentials",
"title": "Invalid credentials",
"status": 401,
"code": "invalid_credentials",
"requestId": "01J9R2K8T4V6XQ0M3B7C5D9E1F"
}