1

Using the following endpoint trying to set the header Link to example

curl -X GET  '<SIGNED_DOWNLOAD_URL>' -H '<FIRST_SIGNED_COOKIE>;<SECOND_SIGNED_COOKIE>;<THIRD_SIGNED_COOKIE>'

here is an example of the headers names and values from the header of /signedcookies

Key                   Value                                                                                                                            
---                    -----                                                                                                                            
CloudFront-Policy      =eyJTdGF0ZW1lbnQiOl2YXRpdmUuYL2RYSnVPbUZrYzJzdWQybHdaVzFsWVRwbWN5NW1hV3...
CloudFront-Key-Pair-Id APKAIJ4JBLIOQMJEURDQ; Path=/; Domain=cdn.derivative.autodesk.com; HTTPOnly                                                       
CloudFront-Signature   jFRbEY5nFXtgFgW1WqRiAHXYFwYisMotr7nwu-gRiUkc8JcgLRhQyLlPFF4CyIVbi8OOqhet-ti974...

However, I get the following error that suggest I'm missing a header MissingKeyMissing Key-Pair-Id query parameter or cookie value

Tom Denby
  • 33
  • 5

2 Answers2

1

I figured out the issue, you need to pass the data through the url via a query rather than a header. e.g.

https://cdn.derivative.autodesk.com/XXX/output/0/properties.db?Key-Pair-Id=XXX&Signature=XXX&Policy=XXXX
Tom Denby
  • 33
  • 5
  • Thanks for Tom's sharing. With this approach, we need to remove `; Path=/; Domain=cdn.derivative.autodesk.com; HTTPOnly` from the CloudFront cookie values we got from the response header. – Eason Kang May 10 '23 at 07:55
0

Generally, We can specify the cookie this way:

curl -X GET  '<SIGNED_DOWNLOAD_URL>' -H 'Cookie: <FIRST_SIGNED_COOKIE>;<SECOND_SIGNED_COOKIE>;<THIRD_SIGNED_COOKIE>'

see also: https://stackoverflow.com/a/74066251/7745569

Eason Kang
  • 6,155
  • 1
  • 7
  • 24