A042 redirect Access Denied

I’m trying to send the 2nd GET message for A042 based off the Location returned in the OK 307 redirect message (seen below) but I’m getting an Access Denied error


*Ignore the FILEPATH key/value pair, that’s just where I want to download the attachment to.
I’m sending the X-Amz-Security-Token that was sent to me, within the 900 seconds that it says it expires after.

Hello sgroom,

Can you please provide some more details on the process you are following to get the file?

Please provide all steps up until the error if possible with the calls you are using including headers, any IDs you are using etc.

This will help me investigate this more.

thanks,
Balal

A005 - out


A005 response

A042 out

A042 response

Redirect out based on the location

Redirect response

image

hello sgroom,

When calling GET A042, the API does not return the binary file directly. Instead, it returns a 307 Temporary Redirect with a Location header.

That Location header points to a pre-signed AWS S3 URL. The URL itself already contains all the required query needed to fetch the file.

Now, it seems like you are taking that URL apart into host/path/query and trying to add other values manually. This alters the signed URL, so the AWS signature no longer matches. Try to follow the Location header from the 307 response and perform a plain GET to that exact URL, unchanged.

You have to request the file, the exact same way it has been generated to you as it is a signed URL so there are strict rules on how these are used due to security.

thanks,
Balal

I think the only one I’ve added is filepath that can be ignored, that’s just telling my system where to download the attachments to; I don’t think it should be sent out as part of the connection

RequestId - FH8TP80E52R7GVKA
HostId - AFYgwX1Ro5s/0+0x986SdFVkpwIE+gSmCsnp1YEdAOu5HTQNqahPuwrhorqKHR8RHmOhmDTz7D0=

Please give me any insights into why my connection is failing from what you’re receiving. If I’ve missed anything, added anything etc.

Hello sgroom,

I will message you directly to try and help.

Thanks,
Balal