Skip to content

Troubleshooting

How do you read the API errors?

Each error contains 3 pieces of information separated by a | symbol.

  • The first part shows you the row within the CSV where the error occurred.
  • The second part shows the data, which the error is for, and
  • The third part shows the error message.

Example response error

{
  "errors":["6|Doctor1|The 'Off duty date' (1/2/2015 2:00 PM) cannot be more than 30 hours after the 'On duty date' (1/1/2015 1:53 AM)."]
}
I keep getting 401 error when sending requests to the API. How to resolve?

401 errors happen when the client ID, the client secret, or the bearer token you used is incorrect. Make sure you copy the right client ID and client secret from the web UI to get a bearer token.

If you still get 401 error after copying the right client secret and client ID from the web UI, reload the page and copy the secret again. Your client ID will stay the same.

If the issue is not fixed, email our support team with a raw trace of request and response.

What is base64 encoding and how do you encode client ID and client secret using base64 encoding?

It is binary to a text encoding scheme that represents binary data in an American Standard Code for Information Interchange (ASCII) string format.

Most platforms that allow using APIs will automatically convert your string of <ClientID>:<ClientSecret> to base64. If they don't, you can use online tools to help you with that.

There are multiple authorization methods in API reference. Which should I choose?

Our API uses OAuth2.0 for authentication, which is the preferred option for testing our APIs in the API reference documentation. Bearer and basic authentication methods are simplified implementation of OAuth2.0.

The basic authorization method asks for username and password. There is no place to enter Client ID and Client Secret.

Basic Authorization methods require a username and a password as per the Open API 3.0 specification that we adhere to.

For basic authorization, use Client ID as the username and Client Secret as the password.