Connecting to Adobe Document Services API

Hello folks, I want to extract tables from pdf documents uploaded by users and save those as new things to a database. For this, I want to use Adobe PDF services API (Adobe API documentation here). However, I am new to this world of APIs and unable to find a way to correctly authenticate the connection from Bubble to Adobe. I also can’t find a way to upload a sample pdf to see if the response is correct. I am connecting through JSON Web Token (JWT), have a free trial to do 1000 conversions. Please see my current set up below. I get the error: “There was an issue setting up your call. Could not sign request token, check private key”

Can someone help me resolve this? Thanks!


Hi @platform1

Did you manage to fix this?

regards,
Jonathan

Hi Jon, not yet.

I will send you a DM if you are interested.

I need help in viewing the PDF using the Adobe Embeded API for document viewing.

I used the HTML element to place the HTML to view the pdf but the pdf flashes for a fraction of second then disappears. Unable to sort the issue. Any help would be appreciated

Were able to sort it out, I am facing the same issue

I’m looking into this as well, and while I can get everything to work in Postman, I’m having trouble getting the token in the API connector. I’m not sure if I should be using the OAuth2 Custom Token, JSON Web Token, or something else.

If anyone has made this work and can help it would be greatly appreciated.

Can you share what you have in postman and what you have in Bubble?

This is what I have. The service URL is https://pdf-services.adobe.io that I’m using. I was able to use postman to generate the token, then get the presigned url, upload a pdf, fill out a form with JSON data, and then download the filled out form with no issue.

I just don’t know how to get the authentication for the token when using the API connector. I imagine the token has to be refreshed, so is that something that has to be manually done (perhaps using a BEWF to refresh the token in intervals)? I’m not sure.

You are sending your token payload as json and not as url form.

You will need to set client_id=yourclientid&client_secret=yourclientsecret (you don’t need to set them as < > because you will not change them dynamically.

Bubble will not convert your json into an form encoded. Normally, it should work with that, but you may need to use the url instead to set your key/value (after ? at the end of your url).

To validate that the auth part is working, ou can change the url to token to a beeceptor endpoint (or similar service). This way you can check that was sent from Bubble for the auth request to the API and validate that everything is received. Use “fake” client secret and key when you use this kind of services. You could also send the request from Postman to compare both.

1 Like

I tried that initially, and get a bad params error. On beeceptor it does seem to send the token call, so I don’t know whats going wrong here.

Yes it send the token call, but is it correctly encoded? Did you compare with what Postman send?

I got it to work finally. Putting it in the URL didn’t work. But putting the client_id=client_id&client_secret=client_secret into the body worked when using OAuth Custom Token with the base service url: https://pdf-services.adobe.io/token

Thank you for pointing me in the right direction. :slight_smile:

1 Like

Yes this was my first suggestion but didn’t explain it correctly :wink: The url option could be accepted by some API, keep this in mind :wink:

1 Like