Skip to main content
Participant
Oct 15, 2024 11:24 AM UTC
Question

Failure to upload asset with document cloud api

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 is closed to new replies. Start a new post to keep the conversation going.

6 replies

Raymond Camden
Community Manager
Community Manager
Oct 15, 2024 1:26 PM UTC

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

Translate
ran_6324Author
Participant
Oct 20, 2024 9:04 AM UTC

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.

 

Translate
Raymond Camden
Community Manager
Community Manager
Oct 21, 2024 1:11 PM UTC

Can you add screenshots of the PUT operation?

Translate