Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Failure to upload asset with document cloud api

New Here ,
Oct 15, 2024 Oct 15, 2024

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
TOPICS
How to , PDF Services API
917
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 15, 2024 Oct 15, 2024

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 20, 2024 Oct 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:

ran_6324_0-1729414956388.png

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 21, 2024 Oct 21, 2024

Can you add screenshots of the PUT operation?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 27, 2024 Oct 27, 2024

Thanks @Raymond Camden I had an env issues where I was not using the updated ones.

Is there an API for listing existing assets? I could not find such (before creating jobs). or how to verify that a file was uploaded successfully ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Oct 28, 2024 Oct 28, 2024

There is no API to list asssets but you can get the metadata (https://developer.adobe.com/document-services/docs/apis/#tag/Assets/operation/asset.metadata). Our storage system is only temporary, 24 hours, and is not meant to be permanent. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 28, 2024 Oct 28, 2024
LATEST

Thanks for your assistance! @Raymond Camden 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources