All errors from the Visa Platforms Login API return a standardized ErrorResponse object with an error identifier and detailed troubleshooting information. The reference includes HTTP status codes, common causes, and resolution steps to help quickly diagnose and resolve issues.
All API errors return a standardized ErrorResponse object with the following structure:
{
"error": "Error Name",
"errorDetails": "Detailed error description"
}
The error field contains a brief error identifier, while errorDetails provides specific information for troubleshooting.
| Code | Error Type | Common Causes | Resolution Steps |
|---|---|---|---|
| 400 | Bad Request | Invalid request format, missing required fields, schema validation failure, OFAC screening rejection, duplicate user registration | Validate request schema against API specification, check required fields, review OFAC status, verify user uniqueness |
| 401 | Unauthorized | Invalid credentials, expired authentication token, missing Authorization header, bad username/password combination | Refresh OAuth2 token, verify credentials, check authentication flow, ensure proper Authorization header format |
| 403 | Forbidden | Insufficient OAuth2 scopes, unauthorized site access, permission restrictions, client not authorized for operation | Verify OAuth2 scopes match required permissions, confirm site access rights, contact administrator for permission review |
| 404 | Not Found | User does not exist, expired activation token, invalid user ID format, resource not available | Verify user existence using search endpoints, regenerate activation tokens, check user ID format and validity |
| 500 | Internal Server Error | System unavailability, database connectivity issues, downstream service failures, unexpected processing errors | Implement retry logic with exponential backoff, check system status, contact support if errors persist |
| Scenario | Error Response | Resolution |
|---|---|---|
| Invalid login credentials | 401 - Bad credentials | Verify username and password accuracy, check account status, ensure user account is activated |
| MFA code required but not provided | 400 - Request is not valid | Include otp and otpType parameters in login request for MFA-enabled users |
| Expired session token | 401 - Unauthorized | Refresh authentication token or re-authenticate user, implement session extension logic |
| Account locked or suspended | 401 - Bad credentials | Check user account status, contact administrator for account unlock, review security policies |
| Scenario | Error Response | Resolution |
|---|---|---|
| Duplicate user registration | 400 - Request is not valid | Check if user already exists using search endpoints, use update operations instead of registration |
| OFAC screening failure | 400 - Request is not valid | User requires manual review, contact compliance team, do not retry automatically |
| Invalid site configuration | 400 - Request is not valid | Verify siteId matches environment, check site configuration, ensure proper domain mapping |
| Missing required locale | 400 - Request is not valid | Include locale in userSiteAttributes, verify locale format matches expected values |
| Activation token expired | 404 - Activation token expired | Generate new activation token using resend activation email endpoints |
| Scenario | Error Response | Resolution |
|---|---|---|
| MFA already enrolled | 400 - Request is not valid | Check MFA enrollment status before setup, use unenroll endpoint to reset if needed |
| Invalid TOTP code | 400 - Request is not valid | Verify time synchronization on user device, ensure correct TOTP key configuration |
| MFA not setup for user | 404 - User MFA TOTP not setup | Complete MFA setup process before attempting enrollment or unenrollment |
| Scenario | Error Response | Resolution |
|---|---|---|
| No users in ID range | 400 - No user in given id range | Verify user ID range parameters, check user existence before batch operations |
| Invalid call type | 400 - callType not allowed | Use supported call types: OFAC, MOE, ENROLL_PROGRAM_AND_MOE |
| Migration batch not found | 400 - Request is not valid | Verify migration batch ID exists, check migration status using status endpoints |