Please see yet another example: Failed to query [https://api.company-information.service.gov.uk/officers/90CVzKlLYcWpX1dnibRPuKqpKgI/appointments?start_index=0&items_per_page=50]. HTTP Status [401]
So sorry you seem to be having issues.
There are no current problems with our service and we have no other customers reporting issues either.
I can run both of your queries with a standard API key with no issues.
Are you able to access ANY of our API endpoints? Do you have the issue with all of your API keys or just some? Are you able to do a simple curl type call on a command line?
eg
curl : https://api.company-information.service.gov.uk/officers/90CVzKlLYcWpX1dnibRPuKqpKgI/appointments
We are able to perform a curl request using one of the API keys that has been failing, and get a successful response, as per your recommendation.
We are getting these errors intermittently - for example we’ve registered a failure on 10-Jul-2024 12:47:31 BST, but a successful request on 10-Jul-2024 16:27:26 BST for the same API key, therefore it appears that the API keys are fine, but something in the CH system can randomly refuse to authorise our requests.
I hope this helps. If preferable, please point me to a customer support desk where I can raise a ticket for our account issue specifically.
Hi @MArkWilliams, apologies for the delay, yes we are actually:
After 10 or so hits, we got an auth error:curl -XGET -u <redacted>https://api.company-information.service.gov.uk/officers/90CVzKlLYcWpX1dnibRPuKqpKgI/appointments {"error":"Invalid Authorization","type":"ch:service"} @ 10.38am
So we are able to be authorised most of the time, but sometimes CH API will randomly refuse to do so.
We have an integration which loops over around 1,100 companies to return the Officers for each. (This has a one second delay between each query to ensure API limits are not exceeded). This was working successfully at 23:00 each night but failed on 27/06 for one night, then has failed consistently from 03/07 onwards.
I’ve been investigating today and am getting the “The remote server returned an error: (401) Unauthorized.” message at random times which I believe has been the problem over the last few days as nothing else has changed at our end.
We’re also seeing the same issue with intermittent 401 Unauthorized responses when trying to fetch the officers for a company from the API. There is no pattern to this that we can discern, it’s not related to specific companies nor does it occur at particular times.
We’ve seen 84 such failures in the last 24 hours, out of ~8.5K API calls, so it’s a small percentage failing.
I can confirm this issue as well; we have been experiencing exactly the same problem since your maintenance on the 6th of June.
Our app has been encountering a significant number of CompaniesHouse::AuthenticationError: Invalid API key - HTTP 401 errors. This is quite disruptive, as we are seeing around 60 such errors every day.
Could you please investigate this issue further? It has been persistent and is affecting our operations.
It is also related to filing history and appointments API calls. Please see examples below:
Failed to query [https://api.company-information.service.gov.uk/company/12906723/filing-history?start_index=0&items_per_page=35]. HTTP Status [401]
Failed to query [https://api.company-information.service.gov.uk/officers/lmeQIUR5dAJe5St9wMkNlqTDfFM/appointments?start_index=0&items_per_page=50]. HTTP Status [401]
@MArkWilliams thanks for answering questions and providing support here. Just to add a bit more on the issue:
We also use CH API for a variety of workflows and have random “401 Unauthorized” error while querying filling-history API. Everything else (general company info, officers, PSC) works well. It started on 25th June for us.
Just as a FYI, this issue continues for us, the latest failure taking place at 2024-07-17 10:24:01,944 on our system, if that helps:
Failed to query [https://api.company-information.service.gov.uk/officers/uXM5cKq9ruGl1pNlvcoZ-zdvyfA/appointments?start_index=0&items_per_page=50]. HTTP Status [401]
Hi @MArkWilliams, sorry for pestering however as I’m unable to view the status of the internal ticket, would you mind providing an update on the progress here please? This issue is affecting quite a few of our customers. Please also see below for another error today:
Failed to query [https://api.company-information.service.gov.uk/company/14939699/officers?start_index=0&items_per_page=50]. HTTP Status [401]