Closed restapitest3321 closed 4 months ago
I want to create envelope using DocuSign API in my web application. When I run it in postman then response showing C:\wamp64\www\PlayGround\DocuSigneSignature\envelopes0.php:30:null
Hi @restapitest3321
I hope you're doing well.
I wanted to follow up regarding the issue you mentioned previously. Are you still experiencing the problem, or has it been resolved?
If the issue persists, could you please provide more details? Any additional information, such as error messages, steps to reproduce the issue, or screenshots, would be very helpful in diagnosing and resolving the problem.
Thank you for your cooperation and patience.
-Shashanka
Hi @restapitest3321 We wanted to follow up on your create envelope issue. As we have not heard back from you, we hope that the issue is resolved from your side.
We will be closing this ticket assuming the problem has been resolved. If the issue persists or if you need any further assistance, please do not hesitate to reopen this ticket or create a new one.
-Shashanka
`<?php $realpath = "uploads/"; $doc_file = 'dummy.pdf'; $content_bytes = file_get_contents($realpath . $doc_file); $base64_file_content = base64_encode($content_bytes);
$certificate_location = 'C:\wamp64\bin\php\php7.4.26\extras\ssl\cacert.pem';
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $certificate_location); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $certificate_location);
curl_setopt($ch, CURLOPT_URL, 'https://demo.docusign.net/v2.1/accounts/2c5281fc-8adb-4bb1-a764-0a77bd98ec0e/envelopes'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "{\n \"documents\": [\n {\n \"documentBase64\": $base64_file_content,\n \"documentId\": 15464655,\n \"fileExtension\": \"pdf\",\n \"name\": \"document12345\"\n }\n ],\n \"emailSubject\": \"Simple Signing Example\",\n \"recipients\": {\n \"signers\": [\n {\n \"email\": \"sandeep0822@gmail.com\",\n \"name\": \"Sandeep\",\n \"recipientId\": \"{{recipientId}}\"\n }\n ]\n },\n \"status\": \"sent\"\n}");
$headers = array(); $headers[] = 'Content-Type: application/json'; $headers[] = 'Authorization: Bearer eyJ0eXAiOiJNVCIsImFsZyI6IlJTMjU2Iiwia2lkIjoiNjgxODVmZjEtNGU1MS00Y2U5LWFmMWMtNjg5ODEyMjAzMzE3In0.AQoAAAABAAUABwCAxDrMAUfbSAgAgARe2kRH20gCAPvG8RYXzvVIl65odwsvffsVAAEAAAAYAAgAAAAxAAAAMgAAACsAAAA4AAAALQAAAC8AAAA1AAAAMwAAAA0AJAAAAGFhOWZhNjgzLWY0YjQtNGE3Mi05NWE3LTNiNDM0NjczYTVhMyIAJAAAAGFhOWZhNjgzLWY0YjQtNGE3Mi05NWE3LTNiNDM0NjczYTVhMzAAgEXPZP5G20g3ANtSvxlqLSpBqqxieM2bkLM.PyRvZdPTQTrVD5aSKZ0hrRmB9x3ZQ6CeCz5GwcEGLe60qN4XOeE7NT8a83NnHldTIcXBJIosI2WiohFz1L8uyth6Ea38Vk4oAni0gnTXHUKSRyERa7R-gEDNoNdIHpdth7iMQXLMDUPcCY03o0xQV3AP3Oov1Pk770rTBi5XRkrsqpKqLd1HqlrKPF6ahhxai00R1-d0q0ITrwIHzXNdGdd5s7PWpuhYNQUgdHpb5rwqPE51PX48KBBB2g-xGa16ngqUC7EchgtbtGkZBzHKNmiGQ9kufWLi74WlLFgidxh1jxaBOZsm1MT723PbV-1ABOtecZYuU9Eurqp1K5PxLQ'; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch); $response = json_decode($result); if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); } echo '
'; curl_close($ch); ?> `