If you're getting this error, you're not using the correct authentication.
When using our REST API, Basic HTTP authentication should be used in the header. Our docs explain this here: http://docs.clicksend.apiary.io/#introduction/authentication
username - Your API username
password - Your API key
You can get your API credentials by clicking 'API Credentials' on the top right of the dashboard.
username - Your account username
password - Your account password
These are the same credentials that you use to login to the dashboard.
The Authorization header is constructed as follows:
For example, if the user agent uses 'Aladdin' as the username and 'open sesame' as the password then the header is formed as follows:
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
If you're not sure how to do this, you can use the online service http://base64encode.com
curl --include \
--header "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=" \
"Authorization: Basic ".base64_encode($username.":".$password)
Our award-winning customer care team is here for you.Contact Support