The API uses basic HTTP authentication. You can either use your Easy Insight username and password or API key and secret key (recommended for security).
You can find your API key and secret key on your Profile page under the API section. Click on Show API Keys to display the keys. Pass in the key as the basic authentication username and the secret key as the basic authentication password.
You'll also want to set 'Content-Type' and 'Accept' headers to 'application/JSON' to identify the request and response formats.