最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

创建信封时,DocuSign INVALID

运维笔记admin11浏览0评论

创建信封时,DocuSign INVALID

创建信封时,DocuSign INVALID

我正在将accesstoken与文档数据一起发送,但出现此错误。我是否以正确的顺序发送文档数据

bodyData = {
  "status": "sent",
  "emailSubject": "Sent from the DocuSign REST API",
  "documents": [{
    "documentId": "1",
    "name": "contract.pdf",
    "documentBase64": "base64 document bytes...",
  }],
  "recipients": {
    "signers": [{
      "email": "....",
      "name": "Jane Dough",
      "recipientId": "....",
      "routingOrder": "1",
    }]
  }
}

curl.setHeaders([
  `Authorization: Bearer ${auth}`,
  "Content-Type: application/x-www-form-urlencoded"
])
  .setBody(bodyData)
  .post(`/${accountId}/envelopes`)
  .then(({ statusCode, body, headers }) => {
    console.log('body : ', body)

    return res.status(200).json({
      success: true,
      data: body
    });
  })
  .catch(e => {
    console.log(e);
  });
    } catch (err) {
  console.log("err : ", err);
  // next(Boom.badImplementation(err));
}
回答如下:

需要将content_type更改为application / json

此外,还需要确保在请求中发送正确的正文。

我也建议您考虑使用eSig REST API的最新版本2.1

在此处查看此API的文档-https://developers.docusign/esign-rest-api/reference/Envelopes/Envelopes/create

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论