Problems with the PSC API

Hi,

This stopped working for me yesterday and i reported it to our contact at CH. Just wondering if anyone else is getting the same issue. This is what happens when using the API through the test webpage.

Request
GET /company/11332378/persons-with-significant-control HTTP/1.1
Host: api.companieshouse.gov.ukundefined
Response status
401 Unauthorized
Response body
{
“error”: “Invalid authorization header”,
“type”: “ch:service”
}
Response headers
content-type: application/json
cache-control: proxy-revalidate

Hello,

Your example does not show if you used an API key to authenticate. If you did use an API key, the problem may be with that key. You can manage your API key’s by going to “Your Applications” in your account.

Regards,
Kevin

Hi Kevin,

Yes, I have tried using an existing key from the dropdown, which didn’t work. I also created a new Key this morning and that also didn’t work.

Cheers Iain

Hi Iain,

In the dropdown next to “Authorise with API Key” is your API key listed and selected?

https://screenshots.firefox.com/se5pUOJAPhWkgEKo/developer.companieshouse.gov.uk

Kevin

Hi Kevin,

Yes,I’ve selected them from the dropdown. I’ve tried with both an existing key which was working up until yesterday and a new key that I created this morning. Are you able to replicate the error with your own key ?

Cheers Iain

Hi Iain,

Unfortunately not, using an existing key and creating a new one works for me querying PSC’s using that company number. I assume there are no IP’s and domains listed in the IP restrictions and JavaScript domains on the API key settings page?

Kevin

Hi Kevin,

I think the issue is with our network here. I have just tried the API from an external PC and it worked. Many thanks for taking a look.

Iain