Error codes · Keys and signatures
Invalid credentials
invalid_credentialsInvalidCredentialsExceptionAn earlier copy of this order may have gone through
This request bought nothing, but it was refused before Anis looked at the order, so it says nothing about an earlier attempt with the same operation id. Fix the cause first (restore access, or fix how the request is signed), then resume the same id (or read it with GET /orders/{operationId}). Never place it again under a new id.
What it means
Anis could not authenticate the call: the key id is unknown; the key is not active (not yet confirmed, revoked or past its end date), or it is a replaced key whose overlap has ended; the signature does not match the request; or the signature is too old or signed on a clock that is out. All of these get this same answer on purpose, so a refusal never tells anyone which one to work around. A badly built signed request is answered malformed_signed_request instead.
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, andkeyExpiresAtis the date it stops working. - Check your server clock, and sign each attempt afresh — never reuse an old signature.
- After a key replacement (both keys work for up to 30 days, counted from when the new key starts working): when the overlap ends, the old key is refused as
invalid_credentialsby itself — nobody needs to do anything. Move your signer to the new key id before then. - Run the signature self-check: it reports exactly what Anis saw. If it is refused too, check the key and its state, your clock, and the address you call — it must be the one Anis gave you.
- On an order: refused before Anis looked at the order, so it says nothing about an earlier attempt with the same operation id. Restore access first, then resume the same id (or read it with
GET /orders/{operationId}). Never place it again under a new id.
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 - GETRead a catalogue card
/v1/wallets/{walletId}/catalog/cards/{cardId} - POSTPlace an order
/v1/wallets/{walletId}/orders - GETRead an order
/v1/orders/{operationId} - GETList owned cards
/v1/wallets/{walletId}/owned-cards - GETRead an owned card
/v1/wallets/{walletId}/owned-cards/{soldCardId} - POSTReveal a card
/v1/wallets/{walletId}/owned-cards/{soldCardId}/reveal - POSTReveal an invoice
/v1/wallets/{walletId}/invoices/{invoiceId}/owned-cards/reveal - POSTSuspend your application
/v1/application/suspend - POSTRevoke an application key
/v1/keys/{keyId}/revoke - POSTCheck your signature
/v1/diagnostics/signature - GETList your allowed addresses
/v1/application/networks - POSTAllow one more address
/v1/application/networks - POSTRemove an address you added
/v1/application/networks/remove - GETGet meter packages
/v1/wallets/{walletId}/meter-packages - GETGet my meter charges
/v1/wallets/{walletId}/meter-charges - POSTCharge a meter
/v1/wallets/{walletId}/meter-charges - GETRead a meter charge
/v1/meter-charges/{operationId} - GETGet direct recharge products
/v1/wallets/{walletId}/direct-recharge-products - GETRead a direct recharge product
/v1/wallets/{walletId}/direct-recharge-products/{productId} - GETGet recipient locations
/v1/wallets/{walletId}/direct-recharge-products/{productId}/locations - GETQuote a direct recharge product
/v1/wallets/{walletId}/direct-recharge-products/{productId}/quote - GETGet my direct recharges
/v1/wallets/{walletId}/direct-recharges - POSTRequest a direct recharge product
/v1/wallets/{walletId}/direct-recharges - GETRead a direct recharge
/v1/direct-recharges/{operationId} - PATCHCorrect a suspended recipient
/v1/direct-recharges/{operationId}/recipient - GETRead your webhook endpoint
/v1/webhook-endpoint - PUTSet your webhook endpoint
/v1/webhook-endpoint - POSTTest your webhook endpoint
/v1/webhook-endpoint/test - GETGet webhook deliveries
/v1/webhook-events - POSTRedeliver a webhook
/v1/webhook-events/{eventId}/redeliver
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"
}