We have tried to download company filing history using the API provided by CH. However, we are getting the below issue when we try to download.
Error
<?xml version="1.0" encoding="UTF-8"?>InvalidArgument
Only one auth mechanism allowed; only the X-Amz-Algorithm query parameter, Signature query string parameter or the Authorization header should be specified Authorization Basic YXVQRUNWRmJ5YWlVdFlZbkxIR1MyN2JydFJfdDdvQVladHptVVZPUDo= GQXGB51DZSPDTJPW o4BSWFEp3hmx1bIsZTd2AqvP1IdQ3RZnDT9PUPZupsWxXPr6k2rTz6jybdXYKHdMGuoLtnqh0vA=
Below is the code for your reference
c# code
var client = new RestClient(“https://document-api.companieshouse.gov.uk/document/KpWfew1NYJ68EZWIpGSZLor5ptvBC7iTaOvAglVpU6w/content”); var request = new RestRequest(Method.GET); request.AddHeader(“postman-token”, “59e4ac5d-446c-9367-d0ac-2841d6a4a15a”); request.AddHeader(“cache-control”, “no-cache”); request.AddHeader(“authorization”, “Basic YXVQRUNWRmJ5YWlVdFlZbkxIR1MyN2JydFJfdDdvQVladHptVVZPUDo=”); request.AddHeader(“accept”, “application/pdf”); IRestResponse response = client.Execute(request);
Please find the below attachment form postman
Please look into this issue and let us know the reason for the above error.