How to download a document from CompaniesHouse API through Postman?

I have been trying, this from 2 days and still didn’t find a solution. I am using the below URL{id}/content
by passing valid document ID, however i keep getting the below error in Postman

<?xml version="1.0" encoding="UTF-8"?>
<Message>Only one auth mechanism allowed; only the X-Amz-Algorithm query parameter, Signature query string parameter or the Authorization

header should be specified
Basic b0JLOGNVOFZJSl9VR2xMWVlXemFlNkxXTb25sbnBqN0hkbw==

1 Like

I don’t know about Postman specifically but sounds like you’re trying to submit an http request to Amazon with the Companies House http authentication. Getting the document involves:

  1. Your request to CH, providing your http authentication to them.
  2. A response from CH which is a redirect to the Amazon server location which includes Amazon’s authentication as part of the URL.
  3. You “following” the redirect above e.g. making a request to Amazon without the CH http authentication but just using the URL provided. (I think it’s valid for a minute or something - I’ve seen this reported on this forum in a sub-post.)

Below is an example of the http header CH send in step 2. This is a redirect (http 302) to the document - note this is an old example and this may have changed:

HTTP/1.1 302 Found
Content-Type: text/plain; charset=utf-8
Date: Fri, 02 Feb 2018 10:20:19 GMT
Location:[..snipped this bit as it's long..]
Server: nginx/1.8.0
X-Ratelimit-Limit: 600
X-Ratelimit-Remaining: 599
X-Ratelimit-Reset: 1517567119
Content-Length: 0
Connection: keep-alive

I’ve also noted the whole process as I understand it in the following post:

@voracityemail thank you for responding to the query. Your example is still a correct example for downloading the document.