Support‎ > ‎errors‎ > ‎

error4011

Status code: 401
Error code: 4011

What it means

This error indicates that the request did not include proper authorization. All communication with the server must be accompanied by an API key. This API key can be provided in one of two ways:

1 - As an HTTP header

This is the more common method. When sending the request to the server, you include an HTTP headers named "Authorization" (an unfortunate name, since this is really about authentication, but that's standards for you) with a value of : "Espresso <API-key>:1" (without the quotes or angle brackets)

eg.

Espresso hhh11adfasdf51324:1


You need to be very precise with this: the word "Espresso" is case-sensitive, and you need one space (easy to put two in testing!) between it and the API key.
In case you're wondering about the :1 suffix, the 1 is actually meaningless, but will be used in a future release for stronger encryption.

2 - In the URL

If it's not convenient to add an HTTP header to the call (for instance, in a browser), you can also specify your API key in the URI:

http://<server-name>/<myaccount>/<myproject>/<myversion>/<myresource>?auth=<API-key>:1

eg.

http://eval.espressologic.com/rest/testaccount/demo/v1/customer?auth=hhh11adfasdf51324:1

Comments