Authentication issue (API)

We are trying to connect to the API and have generated the keys as required. However we are not getting any authentication.

Please could someone explain where we are going wrong. We are using jave and springboot.

1 Like

The process of authentication is detailed in the attached post. If this doesn’t help could you let me know what error you are receiving and what steps the code is following.



@mfairhurst - hope all is well!

I am very new to this site and have been trying to access the API website…I have seen a few of your posts here so figured you might be a good person to ask.

I have registered at CH and can log in - although I don’t think this is the authentication key - would welcome your thoughts on that please.

I have run: curl -u My_Log_In_Username: “{Inserted_Actual_Co_Num}” on my terminal and received the following "{“error”:“Invalid Authorization”, “type”:“ch:service”} / additionally, I ran:

Import requests
url = “
response = requests.get(url, auth=(My_Log_In_Username:, ))

And received a response 400 error message…on this basis I assume it is the authorisation code, so not sure where I find this…any assistance would be fab!


Not sure if it is of any help… I found the following…


You don’t use your username but you use your API key… (don’t forget the colon “:” at the end)

I presume the URL has changed for this now. Unless I am mistaken, you just need to substitute the username with the API key.