Debugging Authentication

The two message_code errors relating to authentication which can occur are: missing_api_authentication and api_authentication_invalid. These indicate there is an actual problem with authentication.

Other message codes like endpoint_not_available_for_your_plan, usage_limit_exceeded, and so on, indicate that authentication is working, but you are encountering some other kind of error to do with your account. Please read the information on Common errors.

Missing API Authentication

This happens when - for some reason - our API servers don't see the X-API-KEY HTTP Header in your request.

Common reasons for this are:

  • The header is misspelled in your request
  • Your code isn't sending it properly (it's not actually putting it in the request)
  • Your server is behind some kind of proxy/gateway which is stripping that header out

If you are receiving this error, please double check your code to confirm that the header is spelt correctly and it's putting the key in the request.

API Authentication Invalid

This happens when the API key you send in the HTTP Header is incorrect.

Common reasons for this are:

A good way of checking to see exactly what your system is sending in its API requests is a handy website called RequestBin. Read our section on Debugging using RequestBin for instructions on how to use it.