Oracle APEX and Adobe Sign electronic signature integration
Retrieving the access Token
In the first two parts we learned how we can let end users authorize your APEX app to send request to Adobe which resulted in code being returned to us. This was then used as a token to retrieve access and refresh tokens which we will be using going forward.
Before we proceed further at this stage we need a document that we want people to sign. If you are already on AOP this would be the place and time to generate the document perhaps store it in a table so that we can send it to Adobe API.
How you generate your document is irrelevant for this post. What I have done is simply found one document uploaded it into a table and I will use this blob column as a document in my calls.
select output_blob into l_file_blob from doc_output where filename = 'output.pdf';
From Adobe perspective first step is to upload this document into 'temporary storage' using
https://api.au1.adobesign.com/api/rest/v6/transientDocuments
There are few interesting pieces to this API so let's look into PL/SQL side. According to the documentation there are three parameters we need to send in.
Authorization - Bearer token which will hold out newly retrieved access token from part 2
File-Name - passed as text in REST body
File - actual .pdf content
The PLSQL call could be something like
And response will be in this format
{transientDocumentId (string): The unique identifier of the uploaded document that can be used in an agreement or a bulk send or web form creation call}
https://api.au1.adobesign.com/api/rest/v6/agreements
Put in PLSQL call as
What we are doing actually, in Adobe, is creating an agreement. Why is this? Look at it as part of how this Adobe workflow works.
After it the requester would receive an email that it has been signed and end user would also receive an email with a chance to download the final file.
Of course there is lots more to it now, like for example multiple signatures or how do we know on database side that this event happened or what is the status of the document and many more APIs to explore.
This guide on integrating Oracle APEX with Adobe Sign is incredibly detailed! Just like Host ever ensures reliable hosting, mastering this integration can streamline your document workflows.
ReplyDelete