Skip to main content
Every request to the Authmatech API must be authenticated. Authmatech uses API-key authentication with two headers that travel together on every server-side call:
The API key is a server-side secret. Never ship it to the browser, a mobile binary, or any client-side code. The native mobile SDKs use a narrow-scoped SDK token instead, and the browser Web SDK is transaction-based — see Credential types below.

Finding your credentials

Your credentials live in the Authmatech dashboard:
  • Client ID — always visible in your account.
  • API key — generated on demand. The raw key is displayed once at generation; afterward only its fingerprint is stored. If you lose it, rotate to issue a new one.

Including credentials in requests

Send both headers on every request:

Credential types

Authmatech issues different credentials for different surfaces. Use the right one for the right place.
The SDK token exists precisely so you never put your API key in app code. The native mobile SDKs register a session with the SDK token; your backend then performs the verification with the API key. The browser Web SDK needs no credential client-side — it runs against a transaction id, and your backend resolves the result with the API key.

Rotating your API key

Rotate from the dashboard or via the API whenever a key may be exposed, or on a regular schedule:
  • POST /v1/api/me/api-key/rotate — rotate your own key (requires your client secret).
  • POST /v1/api/clients/rotate-key — rotate by client.
After rotating, update every system that uses the old key. The rotation endpoints are listed in the API reference.

Security best practices

Treat the API key like a password. Anyone holding it can verify numbers and consume your balance.
  • Never commit keys to source control. Use environment variables or a secrets manager. Add .env to .gitignore.
  • Never expose the API key client-side. Browser bundles and mobile apps are publicly readable. Use the SDK token in native apps; the Web SDK keeps the key on your server by design.
  • Reference keys from the environment in productionprocess.env.AUTHMATECH_API_KEY (Node.js), os.environ["AUTHMATECH_API_KEY"] (Python).
  • Rotate on exposure and on a schedule.

Authentication errors

If either header is missing or the key is invalid, the API returns 401 Unauthorized.
Persistent 401s with a key you believe is correct are usually caused by trailing whitespace or a line break copied with the key. Make sure the header value contains only the key, with no surrounding quotes.

Next steps

Quickstart

See authentication in a complete working call.

API authentication reference

The headers, scopes, and error shapes in detail.