I have used the Companies House API service in order to gather data about UK companies in June without any problem. However, during the last days, I am getting the 403 status code when sending request with the API.
I have read some documentation about this issue. I read that other users had a similar issue (ex: 403 Forbidden from API on one IP address). I know that there is a rate limit in the API usage, which I always respected. I am then wondering whether this block is due to my inactivity in the API key usage. I would then like to know whether I can be unblocked.
We do not block API Keys if they have been inactive. Are you able to submit a single response to the API and get data returned? Initially I would expect to see a 429 returned if you are exceeding your rate limit.
But it would help us diagnose if you can confirm that single transactions are working
I just realised that the IP address I was using now was the root of the problem. I was using my IPv4 address, rather than my public address. Now I can send the requests to Companies House. I write here this as other users may face similar issues.
Hi - 403 is normally a sign on you exceeding the rate limits applied. Could you please provide whether you are using the API and what is the source IP address and I will investigate further
This error indicates that the server has determined that you are not allowed access to the thing you’ve requested, either on purpose or due to a misconfiguration . It’s probably because the site owner has limited access to it and you don’t have permission to view it. The vast majority of the time, there’s not much you can do to fix things on your (*client) end. There are four common causes for 403 Forbidden error (server side) . Here they are listed from most likely to least likely:
An empty website directory
No index page
Incorrect settings in the .htaccess file
Permission / Ownership error
If authentication credentials were provided in the request, the server considers them insufficient to grant access. The client SHOULD NOT automatically repeat the request with the same credentials. The client MAY repeat the request with new or different credentials. However, a request might be forbidden for reasons unrelated to the credentials.
Hello, I am also facing the same problem regarding the API. It appears that my code runs fine for a period and, at a random request attempt, I start getting 403 errors. It does not appear that I am blocked until a certain point which, I should mention, is below the 600 requests per 5 minutes for an API Key.