Skip to content

Error Codes

Every error returned by the SDK includes a code, message, suggestion, and docs_url. Some errors also include a fix_command you can copy-paste.

token/expired

FieldValue
MessageToken has expired
SuggestionRequest a new access token via refresh token endpoint

token/invalid_signature

FieldValue
MessageToken signature verification failed
SuggestionEnsure the token was issued by Rakomi and has not been tampered with

token/malformed

FieldValue
MessageToken is not a valid JWT format
SuggestionEnsure you are passing a complete JWT string (header.payload.signature)

token/invalid_algorithm

FieldValue
MessageUnsupported algorithm. Only RS256 is allowed
SuggestionRakomi tokens use RS256. Do not attempt to use HS256 or other algorithms

token/missing_claims

FieldValue
MessageRequired claims missing (sub, tenant_id, email, sid, iss, aud, exp, iat, jti)
SuggestionEnsure the token was issued by Rakomi login/refresh endpoints

token/invalid_issuer

FieldValue
MessageToken issuer mismatch
SuggestionToken must be issued by rakomi.com. Verify you are using the correct environment

token/not_yet_valid

FieldValue
MessageToken nbf (not before) is in the future
SuggestionCheck system clock synchronization or increase clockTolerance in SDK config
Fix commandnew RakomiClient({ apiKey: "...", clockTolerance: 60 })

token/missing

FieldValue
MessageAuthorization header with Bearer token is required
SuggestionInclude an Authorization header: Bearer <token>

token/internal_error

FieldValue
MessageAn internal error occurred during token verification
SuggestionThis is unexpected. Please retry or contact support

jwks/fetch_failed

FieldValue
MessageFailed to fetch JWKS
SuggestionCheck network connectivity and that baseUrl is correct
Fix commandcurl https://api.rakomi.com/.well-known/jwks.json

jwks/no_matching_key

FieldValue
MessageNo key in JWKS matches token kid
SuggestionThe signing key may have been rotated. This is transient during key rotation — retry in a few seconds

jwks/invalid_response

FieldValue
MessageJWKS response is not a valid JSON Web Key Set
SuggestionEnsure baseUrl points to a valid Rakomi instance

webhook/timestamp_expired

FieldValue
MessageWebhook timestamp is too old (exceeds tolerance)
SuggestionEnsure your server clock is synchronized. The webhook may be a replay attack

webhook/invalid_signature

FieldValue
MessageWebhook HMAC signature verification failed
SuggestionVerify the webhook secret matches the one in your Rakomi dashboard

webhook/missing_header

FieldValue
MessageRequired webhook headers missing (X-Rakomi-Signature, X-Rakomi-Timestamp, X-Rakomi-Delivery-Id)
SuggestionEnsure you are passing the raw request headers to verifyWebhook()

webhook/invalid_body

FieldValue
MessageWebhook body is not valid JSON
SuggestionUse express.raw() or express.text() middleware to preserve the raw body for webhook routes

config/missing_api_key

FieldValue
MessageapiKey is required
SuggestionPass your API key when creating the client
Fix commandnew RakomiClient({ apiKey: "akm_live_xxx" })

config/invalid_base_url

FieldValue
MessagebaseUrl must be a valid HTTPS URL
SuggestionUse a full URL including protocol, e.g., https://api.rakomi.com

config/missing_webhook_secret

FieldValue
MessagewebhookSecret is required for webhook verification
SuggestionPass your webhook signing key in config
Fix commandnew RakomiClient({ apiKey: "...", webhookSecret: "whsec_xxx" })

These errors are returned by the Rakomi API (not the SDK):

auth/token_expired

FieldValue
MessageAccess token has expired
SuggestionUse the refresh token to obtain a new access token

auth/invalid_credentials

FieldValue
MessageInvalid email or password
SuggestionCheck your credentials and try again

auth/email_not_verified

FieldValue
MessageEmail address has not been verified
SuggestionCheck your inbox for the verification email or request a new one

tenant/social_signup_blocked_minor_protection

FieldValue
MessageSelf-service sign-up via this channel is not available for this tenant.
SuggestionContact your tenant administrator for other provisioning options, or direct the user to the tenant’s own registration form, which collects the information minor protection requires.

Returned with HTTP 403 when a tenant has minor protection enabled and a stranger attempts to create a new account through a social provider, the EUDI wallet channel, or by claiming an anonymous session — none of which collect the date of birth minor protection requires. It never applies to an existing user signing in or linking an additional provider to an account they already have.