Getting 403 on all requests via API call but fine using Postman, Curl etc

Our live app is calling the following API https://api.company-information.service.gov.uk/company/00000006 but getting 403 using basic authentication. Other environments running on different IPs are also facing the same issue.

To replicate the same issue I created a new account, registered couple of api keys which work fine in postman, curl in windows command line but wont work when an api call is initiated by the app. Not sure why e.g. the following curl call works in command line

curl -XGET -u afdfac77-5d93-41d5-9c0a-975155xxxxx: https://api.company-information.service.gov.uk/company/00000006

And this does work in the app

Any ideas guys as still facing the same issue? thanks

Is this just a case of not sending the correct CORS headers? There’s some information in this thread:

(It’s of course possible that somehow Companies House think you’ve exceeded the rate limit on a particular API key but you should know if that’s likely or not. If you’re using some kind of cloud server you may have issues also:

)

When registering with Companies House you need to choose a “live” app (but you’ve said it is)
Where is your app running from / how?
If it’s from a client-side environment / using CORS (e.g. javascript), did you put the domain name of your site in the javascript domain names section when registering?
If it’s from a server, did you put the IP address in?
If you’re using a localhost server did you use the localhost workaround?
How is your app generating the Authorization header? If doing this yourself you need to remember to add the colon at the end of the API key before base-64 encoding.

Hope this helps.