Accessing Companies House API For Searching Companies - Error 400 Bad Request

What are you trying to achieve?

Hey folks, I am trying to build automation for accessing Companies House using HTTP Request > Parse JSON > Google Sheets, but I am getting a 400 Bad Request error.
The error comes as below:
DataError
Error: 400 Bad Request
{“error”:“Invalid Authorization header”,“type”:“ch:service”}

Steps taken so far

Yes, I have grabbed the URL, got myself a Key from Companies House API section using their REST API key.
I have the URL as
https://api.company-information.service.gov.uk/advanced-search/companies, performing a GET with Authorization and Value as the Basic

That error is often associated with invalid access credentials. Make sure your credentials are setup correctly with the API

Yes, I followed the guidelines as outlined by ChatGPT too. Here’s the full breakdown of the request I made and the steps given. Obviously overwriting the API-KEY with my own Base64 generated one from Companies House.

I’ve attached in a Google Doc LINK

How did you enter in the authorization in your headers?
I’m thinking it should be like this:
Name = Authorization
Key = Basic ‘API KEY’

Welcome to the Make community!

Beware of using generative AI to solve your scenario problems on Make. They have no idea how to use it, and I can see at least three steps in the document contain incorrect or outdated advice.

Hope this helps! Let me know if there are any further questions or issues.

@samliew


P.S.: Did you know, the concepts of about 70% of questions asked on this forum are already covered in the Make Academy. Investing some effort into it will save you lots of time and frustration using Make later!

1 Like

Hi LinkYourTech, yes exactly how I did it. Screenshot here shows what I had entered.

And from the Companies House website API section, this is where I grabbed the URL to use.

Hmm… not sure. I am getting the same error when i run the same query. Im pretty sure we are missing someting. I am not too familiar with this API but looks like there is a developer forum for Company House. Perhaps you might find better luck posting your question there?

After starting again with a new API key this time as LIVE and not test, I now get a 404 error as below.

DataError

Error: 404 Not Found

  • {}
Origin

HTTP

Anyone know what this means?

I’ve got the GET URL as
https://api.company-information.service.gov.uk/advanced-Search/companies