Skip to main content
The SDK throws AuthenticaAuthenticationError: the API key is missing or invalid.
  • Check that AUTHENTICA_API_KEY is set in the process that runs your server, not only in your local shell.
  • Make sure the key has no surrounding quotes or whitespace.
  • Confirm the key is still active in the Authentica portal.
The request reached the API, but the input was rejected. The SDK throws AuthenticaApiError with status 422.
  • Check required fields and formats, such as international phone numbers.
  • For OTP verification, the code may be wrong or expired. Treat it as a failed verification.
  • For face and voice verification, check that the images or audio meet the service requirements.
A 422 is an API response, not an SDK bug.
You are sending too many requests. The SDK throws AuthenticaApiError with status 429.
  • Check error.retryAfterSeconds. If set, wait that long before trying again.
  • Do not resend OTPs automatically; ask the user to try again later.
See Rate limits.
The SDK throws AuthenticaConnectionError when no response is received.
  • Check that your server allows outbound HTTPS to api.authentica.sa.
  • Check DNS, proxy and firewall settings.
  • If you set a custom baseUrl or fetch, check those first.
  • If everything looks correct, contact Authentica support.
The SDK throws AuthenticaTimeoutError when a request exceeds timeout (30 seconds by default).
  • Check network latency between your server and Authentica.
  • Adjust timeout if needed. See Configuration.
  • The operation may still have completed. Do not resend an OTP automatically.
The SDK throws AuthenticaResponseError when a 2xx response is empty, not valid JSON or missing expected fields.
  • Upgrade to the latest SDK version.
  • If it continues, contact Authentica support with the time of the request and the error name. Do not share API keys or user data.
The SDK requires Node.js 22 or later. Check your version:
Upgrade Node.js in every environment that runs your server, including CI and production.
The SDK throws if you create a client in a browser, because doing so would expose your API key.
  • Move all Authentica calls to your backend.
  • Expose your own endpoint for your frontend to call.
  • If your API key was included in a frontend bundle, rotate it immediately.