I am experiencing an authentication issue with a newly created Live REST API key.
Application: DMAS Lead Generation
Environment: Live
Key type: REST API key
Restricted IPs: None
JavaScript domains: None
I am trying to access the Companies House Public Data API using the documented HTTP Basic Authentication method, with the API key as the username and a blank password.
Endpoint tested:
https://api.company-information.service.gov.uk/company/17145528
I have tested the key independently using Windows curl.exe, not just through my application.
The request follows the documented format:
curl -i -u "<API_KEY>:" -H "User-Agent: DMAS-Lead-Generation/1.0" https://api.company-information.service.gov.uk/company/17145528
The response is:
HTTP/1.1 400 Bad Request
{"error":"Invalid Authorization header","type":"ch:service"}
The response headers also include:
Ch-Authentication-Error: Invalid Authorization header
I have:
- Created a Live application.
- Created a new REST API key.
- Copied the key directly using the Developer Hub’s Copy function.
- Tested the key using the documented Basic Authentication method.
- Tested it independently using Windows
curl.exe. - Confirmed there are no IP restrictions or JavaScript domain restrictions.
- Generated a fresh key and received the same response.
Could you please check whether the Live REST API key for this application/account has been correctly activated/provisioned, and advise if there is any additional activation or account approval step required?
I would be grateful if you could also confirm whether there is currently an issue affecting newly generated Live REST API keys.
I have not included the API key itself for security reasons.