Answered
PDF Services API step-by-step
Hi Adobe Community.
I can't make PDF Services API work. Here is what I do.
curl --location 'https://pdf-services.adobe.io/token' --header 'Content-Type: application/x-www-form-urlencoded' --data-urlencode 'client_id={{Placeholder for Client ID}}' --data-urlencode 'client_secret={{Placeholder for Client Secret}}'Response:
{"access_token":"{{access_token}}","token_type":"bearer","expires_in":86399}curl -L -X POST 'https://pdf-services.adobe.io/assets' -H 'X-API-Key: cef2562e3499476c8d8543291a16f8f1' -H 'Authorization: Bearer {{Placeholder for access_token}}' -H 'Content-Type: application/json' -d '{"mediaType": "application/pdf"}'Response:
{"uploadUri":"{{uploadUri}}?X-Amz-Security-Token={{Security-Token}}&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20250524T071921Z&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Expires=3600&X-Amz-Credential={{Credential}}&X-Amz-Signature={{Signature}}","assetID":"urn:aaid:AS:UE1:ad2257b2-5xxx-4f7b-xxxx-377xxxxxa08b"}curl -L -g -X PUT '{{Placeholder for uploadUri}}' -H 'Content-Type: application/pdf' --data-binary '@{{Placeholder for PDF file path}}'I don't receive a response from this last command.
When I access the uploadUri, the XML is:
<Error>
<Code>AuthorizationQueryParametersError</Code>
<Message>Query-string authentication version 4 requires the X-Amz-Algorithm, X-Amz-Credential, X-Amz-Signature, X-Amz-Date, X-Amz-SignedHeaders, and X-Amz-Expires parameters.</Message>
<RequestId>PMYTWEZEEFPKC93R</RequestId>
<HostId>52FkGL6t3tYRbVApF1Y0pOOi3n5jktZsCbPlN3ZmuJM3JSnbTFqq8hDKP9WtwJ1xkztawcP/1JE=</HostId>
</Error>And in one ocasion I got:
<Error>
<Code>AuthorizationQueryParametersError</Code>
<Message>Error parsing the X-Amz-Credential parameter; the Credential is mal-formed; expecting "<YOUR-AKID>/YYYYMMDD/REGION/SERVICE/aws4_request".</Message>
<RequestId>KWPHHSXKKFJDGXAS</RequestId>
<HostId>BwOSGUCPiRQt2bpAqc7oRPZCFWKlLlaBN7AnKarSPWxF0qKgzECc5+RkxI3VkKOnBmReiqlL1Pc=</HostId>
</Error>Please help.
