Skip to main contentSkip to FAQSkip to contact
HTTP 401Authentication

authentication_error

Invalid or expired API key.

Back to all errors

What this means

Generic authentication failure. Aliases unauthorized and invalid_key when the specific cause can't be disclosed.

How to recover

Verify the key is current and matches the environment you're calling.

Example response

All TetraFi errors include a stable code, a human-readable message, and a docs_url pointing to this page.

JSON
1{
2 "error": {
3 "code": "authentication_error",
4 "message": "Invalid or expired API key.",
5 "docs_url": "https://tetrafi.io/docs/integration/errors/authentication_error/"
6 }
7}
7 linesjson

Match in code

TypeScript
1try {
2 await tetrafi.rfq.create({ /* ... */ });
3} catch (err) {
4 if (err.code === "authentication_error") {
5 // Verify the key is current and matches the environment you're calling.
6 }
7 throw err;
8}
8 linestypescript

Related authentication errors