Account
I am a
Developer
Product(s)
Earned badges
Achievement: Latest Unlocked
Topics Started
Replies
Preferences
Topic Started
Topics |
---|
Hi, Getting the below error for reminder. package is in draft status. |
Hi Team, |
Hi I want to add click to initial signature feature on every page of the document, except on one page where the signature type will be capture type. |
Hi |
Replies Created
Reply to: Sample code to send pdf file via rest api
Thursday, June 27, 2019 at 03:21amThank you Duo for such a quick reply.
Yes, I want to send HTTP POST request directly from PL/SQL.
Can I use the above json content in PLSQL?
Reply to: Sample code to send pdf file via rest api
Thursday, July 18, 2019 at 09:31pmHi Duo,
How to check whether the details in json content are reflecting on my account?
I am executing below package in PL/SQL and its getting successfully compiled.
------------------------------------------------------
CREATE OR REPLACE PROCEDURE create_package
/*(
p_errbuf OUT VARCHAR2
,p_retcode OUT NUMBER
)*/
AS
l_param_list VARCHAR2(5120);
l_http_request utl_http.req;
l_http_response utl_http.resp;
l_response_text VARCHAR2(32767);
NAME VARCHAR2(256);
l_header VARCHAR2(512);
VALUE VARCHAR2(1024);
inst_name VARCHAR2(1024);
l_cert_path VARCHAR2(240) := 'xxxx-xxxx-xxxx-xxxx';
l_endpoint_prod_url VARCHAR2(240) := 'https://sandbox.esignlive.com';
l_actions VARCHAR2(240) := 'push_members';
l_api_key VARCHAR2(240) := 'xxxx-xxxx-xxxx-xxxx';
BEGIN
SELECT NAME
INTO inst_name
FROM v$database;
utl_http.set_wallet(l_cert_path, 'xxxx');
-- preparing Request...EBSDEV
dbms_output.put_line('preparing request for ebsdev');
l_http_request := utl_http.begin_request(l_endpoint_prod_url, 'POST', 'HTTP/1.1');
--dbms_output.put_line ('Error '||SQLERRM );
utl_http.set_header(l_http_request, 'Authorization', l_api_key);
-- utl_http.set_header(l_http_request, 'user-agent', 'mozilla/4.0');
utl_http.set_header(l_http_request, 'cache-control', 'no-cache');
utl_http.set_header(l_http_request, 'content-type', 'application/json');
-- sample payload with two signers, one document and one signature for each signer:
l_param_list := '{
"action":"push_members",
"payload":[
{
"roles":[
{
"id":"Role1",
"signers":[
{
"email":"[email protected]",
"firstName":"Abcdef",
"lastName":"qwerty",
"company":"ABC"
}
]
},
{
"id":"Role2",
"signers":[
{
"email":"[email protected]",
"firstName":"Xyzukgtj",
"lastName":"asdfgh",
"company":"XYZ"
}
]
}
],
"documents":[
{
"approvals":[
{
"role":"Role1",
"fields":[
{
"page":0,
"top":100,
"subtype":"Abcdef qwerty",
"height":50,
"left":100,
"width":200,
"type":"SIGNATURE"
}
]
},
{
"role":"Role2",
"fields":[
{
"page":0,
"top":300,
"subtype":"Xyzukgtj asdfgh",
"height":50,
"left":100,
"width":200,
"type":"SIGNATURE"
}
]
}
],
"name":"Sql script"
}
],
"name":"Example Package",
"type":"PACKAGE",
"language":"en",
"emailMessage":"",
"description":"Test Package",
"autocomplete":true,
"status":"SENT"
}
],
"key":"l_api_key"}';
utl_http.set_header(l_http_request, 'Content-Length', length(l_param_list));
-- ...set input parameters
utl_http.write_text(l_http_request, l_param_list);
-- get Response and obtain received value
l_http_response := utl_http.get_response(l_http_request);
LOOP
utl_http.read_text(l_http_response, l_response_text);
dbms_output.put_line(l_response_text);
END LOOP;
-- user_hook_debug (l_response_text);
utl_http.end_response(l_http_response);
EXCEPTION
WHEN utl_http.end_of_body THEN
-- user_hook_debug ('Exceptions');
utl_http.end_response(l_http_response);
END create_package;
-----------------------------------------------------------
Output:
preparing request for ebsdev
302 Found
nginx
302 Found
Reply to: Sample code to send pdf file via rest api
Sunday, July 21, 2019 at 09:38pmI have replaced the url with 'https://sandbox.esignlive.com/api/packages' .
While executing create_package, it executes successfully but shows the following message in output:
"messageKey":"error.unauthorised.noSession","message":"Failed to retrieve Session","code":401,"name":"Unauthorized"}
Reply to: Sample code to send pdf file via rest api
Monday, July 22, 2019 at 01:56amYeah. You were right.
I added Baisc and now the output is : {"id":"oMfJsKCvZSYwU3U8bffg0-aW5ws="}.
Can you please tell me what is the meaning of this ?
Also, the file sent via rest api, it goes as encrypted file ? Do we need to add some kind of encryption to ensure that the file sent is safe?
Reply to: Sample code to send pdf file via rest api
Tuesday, July 23, 2019 at 02:34amI wanted to ask whether the data and file sent via rest api, does it goes as encrypted data or not?
Like the above data which i am sending in json.
And also needed to know about the file.
esign does not recognize encrypted file that is entirely different scenario if at all there is a need to add encryption.
Subscriptions
Topics | Replies | Freshness | Views | Users |
---|---|---|---|---|
Hi, Getting the below error for reminder. package is in draft status. |
10 | 3 years 5 months ago | 214 | |
0 | 3 years 5 months ago | 196 | ||
Hi Team, |
2 | 3 years 6 months ago | 4,076 | |
Hi I want to add click to initial signature feature on every page of the document, except on one page where the signature type will be capture type. |
17 | 3 years 8 months ago | 288 | |
Hi |
2 | 3 years 10 months ago | 307 |
Subscriptions Release Notes
This user is not subscribed to any release notes.