InvalidConfigurationError Error: 401 Unauthorized {"error":"Invalid Authorization","type":"ch:service"}

I’m using make dot com and want to retrieve Advanced Search results for SIC_CODE 61800 (liquidated companies), but I am getting errors as below:

InvalidConfigurationError

Error: 401 Unauthorized

  • {“error”:“Invalid Authorization”,“type”:“ch:service”}

This is what I’ve done.

  1. I’ve created an application to get my API key.
  2. Encoded it to Base64
  3. Inside make dot com I’ve done GET on URL https://api.company-information.service.gov.uk/advanced-search/companies
  4. I’ve set Headers as “Authorization” with Value as Basic <my_base64_API_KEY>
  5. Set Query String as company_status with Value as “liquidation”

What am I doing wrong?

Have you tried the search functionality of this forum?
here are so many posts here to help you fix your issue.
Most common are using a test key on live, not encoding your key correctly and not putting a ‘:’ at the end of your key.

Hi Mark,
Yes I initially did a search but no results were found that had a solution.
And yes, I have a LIVE application API, created the API key and parsed it through to Base64, put a colon at the end too. It’s still coming in as a 400 Error Exact screenshot is attached.
image

and
image

Are you able to do a basic curl command from a terminal e.g.
curl -vvv -u <API_KEY>: https://api.company-information.service.gov.uk/company/09867958

Hi Mark,
This is what I am seeing after putting in your command.


Yes, the API_KEY has been Base64’d

I cannot find that key in our DB.
In the curl command, the api key does not need to be encoded. I have checked your application and there is only one key and it does not start with MmQzZGM0… it starts with 2d3dc43e…

Hi Mark,
I tried using the API key (not encoded), and still came with same error. See attached.

Your curl command is still not using your key that starts ‘2d3dc43e’, the above screen shows a key that starts with ‘34fb9’

Ah yes, now I get a positive result.

Okay, so with that, I want to try again in make dot com to pull this data across.
Do you know if ALL records can be retrieved? Or is there a limit, just like the website itself specifies?

Cool got it to pass all the errors now, thanks a lot Mark for your assistance.

The API is not intended to retrieve all companies, we have bulk products for that.
There is also the streaming API that provides all changes as they are processed.
There is a rate limit of 600 requests per 5 mins, which you must manage in your system. There are X-Ratelimit- header information that can assist you with that. Over use of our services can lead to your access being restricted or denied, in line with our fair use policy.
Keep in mind that this service is ‘unsupported’. This means this Forum is the only support you will get and usually not for anything that is in the documentation or already answered in other posts.
Good luck.