This page will briefly outline how errors should be handled.
Zenlogin follows the JSON:API spec for our API response, including for errors. As such, errors follow the following structure:
{
"errors": [
{
"code": "3003",
"detail": "Invalid *application_key* URL param: appl01234567891"
}
]
}
When an error occurs via an API call, we will return an
errors
array which outlines errors that have occured,
along with the code
and detail
properties for each error object.
When a request error occurs (eg. issues with our server in
processing the request), we will return an HTTP status code of
500
.
When a processing error occurs (eg. an invalid argument), we will
return an HTTP status code of 400
.
When a request is successfully processed, we will return an HTTP
status code of 200
.
The following is a breakdown of all the erorrs you may encounter when making API calls to Zenlogin:
Code | Details |
---|---|
1000 | API request could not be processed. Please contact support: support@zenlogin.co |
1001 | Zenlogin is down for maintenance. This request will not be processed. |
1002 | Your request is too large. For security reasons, we cannot process it. Please contact support: support@zenlogin.co |
1003 | The *identity_key* value is still using the placeholder value. Please change this to the key for the user logging into your product. |
1004 | The *identity_email_address* value is still using the placeholder value. Please change this to the email address for the user logging into your product. |
1005 | The *user_agent* value is still using the placeholder value. Please change this to the User Agent that the user is logging in from. |
1006 | The *ip_address* value is still using the placeholder value. Please change this to the IP Address that the user is logging in from. |
1007 | POST argument *identity_email_address* must be a valid email address. The following was passed in: $value |
1008 | POST argument *identity_metadata* can only be a JSON object. The following was passed in: $value |
1009 | Invalid *ip_address* POST value: $value |
1010 | Invalid request path: $value |
101 | Invalid *req_test* POST value. Can only be the number 0 or 1 (or do not send it along) |
1012 | Invalid *req_wait* POST value. Can only be the number 0 or 1 (or do not send it along) |
1013 | Invalid *req_process* POST value. Can only be the number 0 or 1 (or do not send it along) |
1014 | Invalid *req_force_send* POST value. Can only be the number 0 or 1 (or do not send it along) |
1015 | Header *X_API_SECRET_KEY* is required |
1016 | POST argument *identity_email_address* is required |
1017 | POST argument *identity_key* is required |
1018 | POST argument *ip_address* is required |
1019 | POST argument *user_agent* is required |
1020 | POST argument *ip_address* must be less than (or equal to) 256 characters in length (including multibyte characters |
1021 | POST argument *user_agent* must be less than (or equal to) 512 characters in length (including multibyte characters |
1022 | POST argument *identity_key* must be less than (or equal to) 128 characters in length (including multibyte characters |
1023 | POST argument *identity_email_address* must be less than (or equal to) 256 characters in length (including multibyte characters |
1024 | POST argument *identity_first_name* must be less than (or equal to) 256 characters in length (including multibyte characters |
1025 | POST argument *identity_last_name* must be less than (or equal to) 256 characters in length (including multibyte characters |
1026 | POST argument *identity_full_name* must be less than (or equal to) 256 characters in length (including multibyte characters |
1027 | POST argument *identity_metadata* must be less than (or equal to) 1024 characters in length (including multibyte characters |
2000 | The account associated with this application has been frozen. Please contact support: support@zenlogin.co |
2001 | The account associated with this application is no longer valid. Please contact support: support@zenlogin.co |
3000 | This application has been disabled. Please log into your Zenlogin account to re-enable it: https://zenlogin.co/admin/account/settings |
3001 | While your account is pending approval, email notifications can only be tested for the email address {{owner.emailAddress}}. You are attempting to make a request for the email address: {{identityEmailAddress}} |
3002 | This application has been frozen. Please contact support: support@zenlogin.co |
3003 | Invalid *application_key* URL param: $value |
3004 | This application is no longer valid. Please contact support: support@zenlogin.co |
4000 | This API credential has been frozen. Please contact support: support@zenlogin.co |
4001 | This API credential is no longer valid. Please contact support: support@zenlogin.co |
4002 | Invalid *X_API_SECRET_KEY* Header value: $value |