Copy link to clipboard
Copied
I used 'https://pdf-services-ew1.adobe.io/assets', and got following response:
{
"uploadUri": "https://dcplatformstorageservice-prod-eu-west-1.s3-accelerate.amazonaws.com/16a9de6d208743239d1f694295f12626_254127B763EDC88B0A495FC7%40techacct.adobe.com/471bc6c7-d837-4817-891c-7d042b3025b6?X-Amz-Security-Token=FwoGZXIvYXdzEP%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDIaZ0FfEsaBPTEBY9yLUATxRYzDjDFilQARDSnyOSy2XdBy%2FoL2cLd5OacEA%2FWLosaEJ75p%2BeOwO0ITohEt14Tw7gCamc7OBXD1CR3%2B4tt1%2BT3iM6FT5KwYoFlcyWN00WNg53eWaRrKAqeaZYAOYG6r6BNaZLSx9eMf4KX8audyoDX3ZLrvu9XSQtkBLAzlC5hab0C5voHrGXhwKo6jVMZV1Fea0KQZ7nACQ3woWJ6FdjEgPijk0RDwk3KjpLTnc9IU%2B%2F1AdmcaJ5ozJ0%2B8OUoiluWGS14OPMoD%2FeDlnBOCsSnuvKPD0xp8GMi01KKrkxRzzmVb0nXgyk2vE2dlkWoCk9XT%2FGkeIQdSVrU9QFLfLxtHgF4qeIvU%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20230219T061237Z&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Expires=3600&X-Amz-Credential=ASIAWD2N7EVPIZMO5LHX%2F20230219%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Signature=f344cf4421eb34e9aaa7815d21714b1722b39c031d176567ce32ab0094d472f8",
"assetID": "urn:aaid:AS:EW1:22f40021-93ab-4c3d-a8de-93d4e68de622"
}
Then I did a put request to the resigned URI, and uploaded the file in body in binary in postman.
This request gave 200 OK response.
But after this when I am using 'https://pdf-services-ue1.adobe.io/operation/exportpdf' API, it gives response:
{
"error": {
"code": "NOT_FOUND",
"message": "Asset Not Found."
}
}
How to resolve this issue?
I found the issue where occured wrong pdf service URL https://pdf-services-ew1.adobe.io/operation/ocr
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Can you share _how_ you called exportpdf?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I am using OCR
Copy link to clipboard
Copied
I found the issue where occured wrong pdf service URL https://pdf-services-ew1.adobe.io/operation/ocr
Copy link to clipboard
Copied
Thanks, found the issue.
I was trying to generate JWT token using pyJWT, but it gives the error ''Could not deserialize key data. The data may be in an incorrect format or it may be encrypted with an unsupported algorithm."
payload = {
"exp": 1550001438,
"iss": ADOBE_ORGANIZATION_ID,
"sub": ADOBE_TECHNICAL_ACCOUNT_ID,
"https://ims-na1.adobelogin.com/s/ent_dataservices_sdk": True,
"aud": f"https://ims-na1.adobelogin.com/c/{X_API_KEY}"
}
private_key = '''-----BEGIN RSA PRIVATE KEY-----
<private key here>
-----END RSA PRIVATE KEY-----
'''
encoded_jwt = jwt.encode(payload, private_key, algorithm="RS256")
print('encoded_jwt: ', encoded_jwt)
mp_encoder = MultipartEncoder(
fields={
"client_id": X_API_KEY,
"client_secret": ADOBE_CLIENT_SECRET,
"jwt_token": encoded_jwt
}
)
r = requests.post(
"https://ims-na1.adobelogin.com/ims/exchange/jwt/",
data=mp_encoder,
headers={'Content-Type': mp_encoder.content_type}
)
print('63: ', r.content)
Copy link to clipboard
Copied
Hi - do you mind if you share details on how to generate the jwt ? I'm struggeling with this, I'm using Adobe PDF service API
Copy link to clipboard
Copied
So to be clear, you're good?
Copy link to clipboard
Copied
Yes, thanks a lot for your help.