[英]Unable to create envelopes using DocuSign API error: Object moved
I want to create envelope using DocuSign API in my web application.我想在我的 web 应用程序中使用 DocuSign API 创建信封。 When I run it in postman then response showing object move with html content This is my php code sample
当我在 postman 中运行它时,响应显示 object 移动到 html 内容这是我的 php 代码示例
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://account-d.docusign.com/v2.1/accounts/b15b77b0-9345-4780-bfc1-440b37991820/envelopes?change_routing_order=true',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"documents": [
{
"documentBase64": "Base64 code of my pdf file",
"documentId": "5865888",
"fileExtension": "pdf",
"name": "test pdf"
}
],
"emailSubject": "test pdf",
"recipients": {
"signers": [
{
"name": "User full name",
"email": "user@gmail.com",
"recipientId": "8959555"
}
]
},
"status": "send "
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: [{"key":"Authorization","value":"Bearer {{accessToken}}"}]'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
My API response is我的 API 回复是
Object moved to here. Object 搬到这里了。
Please guide me how to solve the issue请指导我如何解决问题
Thank You谢谢你
That base URL is incorrect.该基数 URL 不正确。 Account-d.docusign.com is only for authentication.
account-d.docusign.com 仅用于身份验证。
Requests should be made to {SERVER}/restapi/v2.1
应向
{SERVER}/restapi/v2.1
提出请求
So for you it would be demo.docusign.net/restapi/v2.1/accounts/{ACCOUNT_ID/envelopes
所以对你来说就是
demo.docusign.net/restapi/v2.1/accounts/{ACCOUNT_ID/envelopes
Here's the dev centre article showing the whole process 这是显示整个过程的开发中心文章
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.