Error Codes

Janrain Registration provides access to advanced features through an API that requires only the ability to POST HTTP requests and parse JSON responses. You can use these requests to retrieve contact data, map an identity to multiple accounts, gain access to analytics, and more. The consistent format allows you to communicate with your application and relay the results to your own site.

Response Format

All responses are JSON in the response body with an HTTP 200 response.

All responses include a stat field, for which the valid values are ok or error.

Success Response

The following is an example of a success response, including sample HTTP headers.

HTTP/1.1 200 OK
Cache-Control: no-store
Content-Type: application/json

{
  "result": {
    "id": "1",
    "firstName": "Robert"
  },
  "stat": "ok"
}

Error Response

Most error responses appear in the following form:

HTTP/1.1 200 OK
Cache-Control: no-store
Content-Type: application/json

{
  "code": 100,
  "error": "missing_argument",
  "argument_name": "uuid",
  "error_description": "missing required argument: uuid",
  "stat": "error"
}

OAuth Error Response

OAuth error responses appear in the following form:

HTTP/1.1 400 Bad Request
Cache-Control: no-store
Content-Type: application/json

{
  "code": 200,
  "error": "invalid_request",
  "sub_error": "invalid_argument",
  "argument_name": "grant_type",
  "error_description": "invalid grant_type: X",
  "stat": "error"
}

Error Responses

The error response always contains at least the following fields:

  • code: an integer error code.
  • error: a machine-readable string code.
  • error_description: a text description of the error.

There is a 1-to-1 relationship between the integer codes and the string codes. We provide both for your convenience.

Request Token

Whenever an API call fails (user error or unexpected error), the response includes a field called request_token, which is a generated string of 16 characters. The token is included in our internal API logs. When you submit a support ticket, you should include the request_token so that we can check our logs and find the exact API call and error.

Additional Fields

Some errors may contain additional fields. The error codes and their extra fields are enumerated below.

The error codes are grouped into the following categories:

  • 100: missing argument.
  • 200-399: errors in this range occur when an argument is invalid in some way.
  • 300-399: errors in this range occur when creating, updating or querying records.
  • 340-369: errors in this range occur when a record value violates the schema. 340-359 are for data type errors and 360-379 are for constraint errors.
  • 400-499: authentication and permission errors, including expired tokens or codes and oauth errors.
  • 500: unexpected internal error.

Any code that is a multiple of 100 or 10 is a catch-all for the codes below it, and may be split off into more specific codes in the future. The error codes that are most likely to change are 200, 320, and 330.

Code Error Description Additional Fields
100 missing_argument A required argument was not supplied. argument_name
200 invalid_argument The argument was malformed, or its value was invalid for some other reason. argument_name
201 duplicate_argument Two or more supplied arguments may not have been included in the same call. For example, both id and uuid in entity.update.
205 invalid_auth_method The request used an http auth method other than Basic or OAuth.
210 invalid_credentials The username/password combination supplied was incorrect. message
211 no_password An email/password combination was supplied, but the account is Social Sign-in only. message
212 no_such_account An email/password combination was supplied, but the email address doesn’t exist. message
213 password_incorrect An email/password combination was supplied, and the email is valid, but the password is wrong. message
221 unknown_application The application ID does not exist. application_id
222 unknown_entity_type The entity type does not exist. type_name
223 unknown_attribute An attribute does not exist. This can occur when trying to create or update a record, or when modifying an attribute. attribute_name
224 application_not_found No application exists on this domain.
226 flow_error The flow is misconfigured and needs to be updated. cause
232 entity_type_exists Attempted to create an entity type that already exists. type_name
233 attribute_exists Attempted to create an attribute that already exists. attribute_name
234 reserved_attribute Attempted to modify a reserved attribute. This can occur if you try to delete, rename, or write to a reserved attribute. attribute_name
300 error_creating_record There was an error while creating a new record. cause
310 record_not_found Referred to an entity or plural element that does not exist.
320 id_in_new_record Attempted to specify a record ID in a new entity or plural element.
330 timestamp_mismatch The created or lastUpdated value does not match the supplied argument. attribute_name actual_value supplied_value
340 invalid_data_format A JSON value was not formatted correctly according to the attribute type in the schema.
341 invalid_json_type A value did not match the expected JSON type according to the schema.
342 invalid_date_time A date or dateTime value was not valid, for example if it was not formatted correctly or was out of range.
360 constraint_violation A constraint was violated.
361 unique_violation A unique or locally-unique constraint was violated.
362 missing_required_attribute An attribute with the required constraint was either missing or set to null.
363 length_violation A string value violated an attribute’s length constraint.
380 email_address_in_use You are attempting to register a new user, but a user already exists with that email address. Typically the next step when receiving this error is to merge accounts. existing_provider existing_display_name existing_photo existing_date_created
390 invalid_form_fields The data you submitted did not pass form validation. For example, an invalid email address. invalid_fields
402 invalid_client_credentials The client ID does not exist or the client secret is wrong.
403 client_permission_error The client does not have permission to perform the action (that is, it needs a feature).
413 no_access_grant The supplied authorization_code is not valid because the user’s access grant has been deleted.
414 access_token_expired The supplied access_token has expired.
415 authorization_code_expired The supplied authorization_code has expired.
416 verification_code_expired The supplied verification_code has expired.
417 creation_token_expired The supplied creation_token has expired.
420 redirect_uri_mismatch The redirectUri did not match. Occurs in the oauth/token API call with the authorization_code grant type. expected_value supplied_value
480 api_feature_disabled The API call was temporarily disabled for maintenance, and will be available again shortly.
500 unexpected_error An unexpected internal error.
510 api_limit_error The limit on total number of simultaneous API calls has been reached.
540 triggered_error An error was triggered in the flow. message
Scroll ↓