Skip to main content
Participant
October 15, 2024
Question

Failure to upload asset with document cloud api

  • October 15, 2024
  • 1 reply
  • 933 views

Hi!

I am following the PDF Services API instructions. using POSTMAN

And I get stuck when trying to upload the asset

1. I authenticate and create a token (https://pdf-services.adobe.io/token

(receive access token)
2. I create an asset (POST https://pdf-services.adobe.io/assets)

(tried different  mediaType including  "application/pdf")

(receive uploadUri and assetId)

3. I try to upload a file (PUT to uploadUri from before)

and I constantly receive this error

 

<Code>SignatureDoesNotMatch</Code>
<Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>

 

What is the problem?
Thanks
This topic has been closed for replies.

1 reply

Raymond Camden
Community Manager
Community Manager
October 15, 2024

It's hard to help without seeing your Postman in action. Can you confirm it picked up the variables from step 2?

ran_6324Author
Participant
October 20, 2024

Thank you for answer @Raymond Camden , I am not sure which variables you are referring to.
See request copied from the "Getting Started" page

curl --location -g --request PUT 'https://dcplatformstorageservice-prod-us-east-1.s3-accelerate.amazonaws.com/b37fd583-1ab6-4f49-99ef-d716180b5de4?X-Amz-Security-Token={{Placeholder for X-Amz-Security-Token}}&X-Amz-Algorithm={{Placeholder for X-Amz-Algorithm}}&X-Amz-Date={{Placeholder for X-Amz-Date}}&X-Amz-SignedHeaders={{Placeholder for X-Amz-SignedHeaders}}&X-Amz-Expires={{Placeholder for X-Amz-Expires}}&X-Amz-Credential={{Placeholder for X-Amz-Credential}}&X-Amz-Signature={{Placeholder for X-Amz-Signature}}' \
--header 'Content-Type: application/pdf' \
--data-binary '@{{Placeholder for file path}}'

 to the best of my understanding, I replace the URL with the uploadUri received from the previous request (create asset). see screenshot below of the create asset:

So what I do is take this uploadUri, and send the PUT request to it along with the file I wish to upload.

This URL btw (received in step #2) is already invalid when trying to access it directly. so I don't think the problem is in step #3 but with the uploadUri received in step #2.

 

Raymond Camden
Community Manager
Community Manager
October 21, 2024

Can you add screenshots of the PUT operation?