MojoAuth API Error Codes
The MojoAuth API uses standardized error codes to help you identify and resolve issues. Each error includes a specific code, message, and description to guide troubleshooting.
Error Response Format
All API errors follow this JSON structure:
{ "error_code": 900, "message": "Invalid Email Address", "description": "Email address format is invalid." }
Authentication & Authorization Errors
Code | Message | Description |
---|---|---|
1004 | Bad Request Method | Please check your request method. |
904 | API Key Required | API key is required to process this request. |
905 | Invalid API Key | The provided API key is invalid. |
906 | API Secret Required | API secret is required to process this request. |
907 | Invalid API Secret | Valid API secret is required to process this request. |
908 | Access Token Required | Access token is required to process this request. |
909 | Invalid Access Token | The access token is invalid or malformed. |
922 | Refresh Token Required | Refresh token is required to continue. |
923 | Invalid Refresh Token | The refresh token is invalid or expired. |
Email Validation Errors
Code | Message | Description |
---|---|---|
900 | Invalid Email Address | The email address format is invalid. |
901 | Email Required | Email address is required to process this request. |
921 | Email Domain Not Allowed | Access for this email address is restricted. |
1004 | Business Email Required | A work or business email address is required for sign up. |
1148 | Email Profile Not Found | The specified email address is not linked to any profile. |
1160 | User Not Found | The user account does not exist. |
OTP & Magic Code Errors
Code | Message | Description |
---|---|---|
902 | Magic Code Required | Magic code is required to continue. |
910 | Invalid Magic Code | The magic code is invalid or expired. |
911 | Invalid Email OTP | The email OTP is invalid or expired. |
912 | OTP Required | OTP is required to continue. |
913 | Invalid OTP | The OTP is incorrect or expired. |
915 | Email OTP Expired | The email OTP has expired. |
1155 | Invalid Verification OTP | The email verification OTP is invalid. |
1156 | Verification OTP Used or Invalid | The email verification OTP has already been used or is invalid. |
1157 | Verification OTP Expired | The email verification OTP has expired. |
State Management Errors
Code | Message | Description |
---|---|---|
912 | State ID Required | The state ID is required to continue the request. |
914 | Invalid Session State | The authentication session state is invalid. |
924 | State ID Expired | The state ID has expired. |
1171 | Invalid State Parameter | The state parameter in the authentication response is invalid or expired. |
1194 | Invalid Session State | The session state is invalid or malformed. |
Phone Authentication Errors
Code | Message | Description |
---|---|---|
915 | Phone OTP Expired | The phone OTP has expired. |
916 | Phone OTP Not Sent | Unable to send OTP to the phone number. |
917 | Phone Configuration Missing | Phone authentication configuration is missing. |
918 | Required Field Missing | A required field is missing from the request. |
919 | Invalid Phone Number | The phone number format is invalid. |
CAPTCHA Errors
Code | Message | Description |
---|---|---|
902 | CAPTCHA Token Required | CAPTCHA token is required for this request. |
903 | CAPTCHA Validation Failed | CAPTCHA verification failed. |
1186 | CAPTCHA Required | CAPTCHA verification is required to continue. |
Passkey/WebAuthn Errors
Code | Message | Description |
---|---|---|
904 | Passkey Identifier Required | Passkey identifier is required to continue. |
1100 | Invalid Passkey Credential ID | The passkey credential ID is invalid. |
1103 | Passkey List Fetch Failed | Failed to fetch the passkey list. |
1128 | Passkey Flag Required | Passkey flag is required for the logged in user. |
1131 | Invalid Passkey Request | The passkey authentication request is invalid. |
1132 | Passkey Assertion Failed | The passkey assertion failed to validate. |
1133 | Credential ID Required | Passkey credential ID is required. |
1134 | Invalid Credential ID | The passkey credential ID is invalid. |
1135 | Passkey Credential ID Required | Passkey credential ID is required. |
1136 | Passkey User Identifier Required | User identifier is required to check passkey status. |
1137 | Invalid Passkey Request | The passkey authentication request is invalid. |
1138 | Passkey Assertion Failed | The passkey assertion failed to validate. |
1140 | Invalid Identifier | The passkey identifier is invalid or does not exist in the records. |
1145 | Passkey Initialization Failed | The passkey could not be initialized. |
1146 | Invalid Passkey Request | The passkey authentication request is invalid. |
1147 | Passkey Not Linked | The passkey is not associated with an account. |
1195 | Passkey Registration Failed | The passkey registration request failed. |
1196 | Invalid Passkey Registration Session | The passkey registration session is invalid or malformed. |
1197 | Passkey Registration Credential Creation Failed | Failed to create the passkey registration credential. |
1198 | Passkey Login Credential Creation Failed | Failed to create the passkey login credential. |
1199 | Passkey Login Session Save Failed | Failed to save the passkey login session. |
Social Provider Errors
Code | Message | Description |
---|---|---|
925 | Invalid Provider | The provider name or ID is invalid. |
1106 | Provider Unavailable | Social login access is currently unavailable. |
1107 | Provider Not Configured | This identity provider is not configured. |
1108 | Provider Not Supported | This identity provider is not supported. |
1109 | Social Provider Not Configured | This social identity provider is not configured. |
1141 | Invalid Google Token | The Google JWT token is not valid. |
1142 | Invalid Google Token Issuer | The Google JWT token issuer is invalid. |
1143 | Invalid Google Token Audience | The Google JWT token audience is not valid. |
1144 | Google Token Expired | The Google JWT token has expired. |
1193 | Facebook Access Token Required | Facebook access token is required to proceed. |
OIDC/OAuth Errors
Code | Message | Description |
---|---|---|
1102 | Invalid Redirect URL | The redirect URL is not configured or invalid. |
1110 | Redirect URL Missing | Redirect URL is not defined or whitelisted in the dashboard. |
1126 | Invalid Callback URL | The callback URL format is invalid. |
1127 | OAuth Identifier Missing | OAuth identifier is required in the callback URL. |
1172 | OIDC Provider Not Found | The custom OIDC provider configuration was not found. |
1173 | Token Exchange Failed | The authorization code could not be exchanged for tokens. |
1174 | Invalid ID Token | The ID token is invalid or could not be verified. |
1175 | Invalid Token | The user info endpoint request failed due to an invalid or expired token. |
1176 | Authentication Error | The identity provider returned an error during authentication. |
1177 | Invalid Request | The redirect_uri value does not match any registered redirect URIs for the client. |
1178 | Unauthorized Client | The client is not authorized to request authentication using this method. |
1179 | Access Denied | The request was denied by the resource owner or authorization server. |
1180 | Invalid Scope | The requested scope is invalid, unknown, or malformed. |
1183 | Invalid Request | The request is missing a required parameter, includes an unsupported parameter, or is otherwise malformed. |
1184 | Discovery Failed | Failed to fetch OpenID Provider configuration from the discovery endpoint. |
1185 | JWKS Fetch Failed | Failed to fetch or parse the JSON Web Key Set (JWKS) from the provider. |
1187 | JWKS Configuration Error | JWKS configuration not found or invalid. |
1192 | JWKS RSA Key Parse Error | Failed to parse the JWKS RSA key. |
Password Management Errors
Code | Message | Description |
---|---|---|
1150 | Invalid Verification Token | The reset password verification token is invalid. |
1151 | Verification Link Expired | The verification link has expired. |
1152 | Verification Link Used | The verification link has already been used. |
1154 | Weak Password | The password does not meet strength requirements. |
1158 | Reset Password Link Invalid | The reset password link is invalid or has already been used. |
1159 | Verification Link Expired | This verification link has expired and is no longer valid. |
1161 | Password Too Short | The password must be at least 10 characters long. |
1162 | Password Too Long | The password must not exceed 72 characters. |
1164 | Password Not Configured | This account does not have a password set. |
1165 | Invalid Password | The password credential is invalid. |
1167 | Invalid Token | The provided token is invalid. |
User Management Errors
Code | Message | Description |
---|---|---|
1104 | User Profile Update Failed | Failed to update the user profile. |
1139 | User Not Found | No user found with the provided identifier. |
1149 | Account Inactive | The account is not active. |
1153 | User Not Found | The user account does not exist. |
1163 | Invalid User ID | The user ID is not valid or does not exist. |
1166 | User Fetch Failed | Unable to retrieve user details. |
Rate Limiting & System Errors
Code | Message | Description |
---|---|---|
1000 | Request Not Completed | Unable to complete the request. |
1001 | Bad Request Method | Please check your request method. |
1002 | Page Not Found | Please check your request URL. |
1003 | Too Many Requests | You have exceeded the allowed API request limit. |
1168 | Invalid MFA Access Token | The MFA access token is invalid. |
1169 | MFA Error | An error occurred with multi-factor authentication. |
1170 | Default SMTP Usage Limit Reached | You have reached the limit for sending emails via default SMTP. |
1181 | Server Error | The authorization server encountered an error and could not process the request. |
1182 | Service Temporarily Unavailable | The authorization server is temporarily unable to handle the request. |
1188 | Authentication Failed | Authentication could not be completed due to an unexpected error. |
1189 | Access Token Save Failed | Failed to save the access token. |
Configuration Errors
Code | Message | Description |
---|---|---|
920 | Template Execution Failed | Email/SMS template execution was unsuccessful. |
1105 | Session State Token Creation Failed | Failed to create the session state token. |
1129 | Domain Not Configured | The domain is not configured for this project. |
1130 | Invalid Project ID | The project ID is invalid. |
1135 | JSON Body Required | This request requires a JSON body. |
Magic Link Errors
Code | Message | Description |
---|---|---|
1190 | Magic Link Parse Failed | Failed to parse the magic link. |
1191 | Magic Link Validation Failed | The magic link is invalid or has expired. |
HTTP Status Code Mapping
Most errors map to standard HTTP status codes:
- 400 Bad Request: Invalid parameters, malformed requests
- 401 Unauthorized: Invalid credentials, expired tokens
- 403 Forbidden: Access denied, account restrictions
- 404 Not Found: Resource not found
- 429 Too Many Requests: Rate limiting, usage limits exceeded
- 500 Internal Server Error: System errors
- 503 Service Unavailable: Temporary service issues
Debugging Tips
Common Resolution Steps
-
Authentication Errors (904, 905, 907):
- Verify API keys in dashboard
- Check environment variables
- Ensure keys match the correct environment
-
Email Format Errors (900):
- Validate email on client-side
- Use proper email validation regex
- Trim whitespace from input
-
Rate Limiting (1003):
- Implement exponential backoff
- Add request queuing
- Monitor usage patterns
-
Token Errors (908, 909, 923):
- Check token expiration
- Implement refresh token flow
- Verify token storage
-
Provider Errors (925, 1106-1109):
- Check social provider configuration
- Verify callback URLs
- Test provider connectivity
Getting Help
If you encounter persistent errors:
- Check the Dashboard: Verify your configuration in the MojoAuth dashboard
- Review Logs: Check both client-side and server-side logs
- Test Environment: Try reproducing the error in a test environment
- Contact Support: Reach out with error codes and context
For additional support:
- Email: [email protected]
- Documentation: docs.mojoauth.com (opens in a new tab)
Last updated: October 2025