Docusign APIへのリクエストをいくつか作成していますが、エラーメッセージ{"errorCode": "UNSPECIFIED_ERROR"、 "message": " Base-64文字の配列または文字列です。 }電子メールで電子署名リクエストを送信する方法でファイルを送信しようとしているとき。Docusign電子メールでの署名リクエスト - base64ファイルの内容のエラー
私がリクエストボディで送信しています以下のJSON:
{
"documents": [
{
"documentBase64": "base64 encoded file...",
"documentId": "1",
"fileExtension": "pdf",
"name": "FILENAME.pdf"
}
],
"emailSubject": "Assinatura de documento requerida",
"recipients": {
"signers": [
{
"email": "[email protected]",
"name": "DiegoLopes",
"recipientId": "1",
"routingOrder": "1",
"tabs": {
"dateSignedTabs": [
{
"anchorString": "signer1date",
"anchorYOffset": "-6",
"fontSize": "Size12",
"name": "Date Signed",
"recipientId": "1",
"tabLabel": "date_signed"
}
],
"fullNameTabs": [
{
"anchorString": "signer1name",
"anchorYOffset": "-6",
"fontSize": "Size12",
"name": "Full Name",
"recipientId": "1",
"tabLabel": "Full Name"
}
],
"signHereTabs": [
{
"anchorString": "signer1sig",
"anchorUnits": "mms",
"anchorXOffset": "0",
"anchorYOffset": "0",
"name": "Please sign here",
"optional": "false",
"recipientId": "1",
"scaleValue": 1,
"tabLabel": "signer1sig"
}
]
}
}
]
},
"status": "sent"
}
いくつかの追加情報。私はASPの古典的な呼び出しでこの要求をしています。ログイン情報とトークンデータを取得するにはすでにうまく動作しています。これは、リクエストを送信する方法I "mとする。
<%
response.ContentType="application/json"
dim token
dim baseUrl
dim usrName
dim usrPwd
dim usrIntegKey
dim receiptName
dim receiptEmail
dim docName
dim docContent
usrName = request.QueryString("username")
usrPwd = request.QueryString("password")
usrIntegKey = request.QueryString("integratorKey")
token = request.QueryString("token")
baseUrl = request.QueryString("baseUrl")
receiptName = request.form("receiptName")
receiptEmail = request.form("receiptEmail")
docName = request.form("docToSign")
docContent = replace(request.form("docContent"),"+", " ")
dataSent = ""
dataSent = dataSent & "{" & chr(13)
dataSent = dataSent & """documents"": [" & chr(13)
dataSent = dataSent & "{" & chr(13)
dataSent = dataSent & """documentBase64"": """ & docContent & """," & chr(13)
dataSent = dataSent & """documentId"": ""1""," & chr(13)
dataSent = dataSent & """fileExtension"": ""pdf""," & chr(13)
dataSent = dataSent & """name"": ""NDA.pdf""" & chr(13)
dataSent = dataSent & "}" & chr(13)
dataSent = dataSent & "]," & chr(13)
dataSent = dataSent & """emailSubject"": ""Assinatura de documento requerida""," & chr(13)
dataSent = dataSent & """recipients"": {" & chr(13)
dataSent = dataSent & """signers"": [" & chr(13)
dataSent = dataSent & "{" & chr(13)
dataSent = dataSent & """email"": """ & receiptEmail &"""," & chr(13)
dataSent = dataSent & """name"": """ & receiptName & """," & chr(13)
dataSent = dataSent & """recipientId"": ""1""," & chr(13)
dataSent = dataSent & """routingOrder"": ""1""," & chr(13)
dataSent = dataSent & """tabs"": {" & chr(13)
dataSent = dataSent & """dateSignedTabs"": [" & chr(13)
dataSent = dataSent & "{" & chr(13)
dataSent = dataSent & """anchorString"": ""signer1date""," & chr(13)
dataSent = dataSent & """anchorYOffset"": ""-6""," & chr(13)
dataSent = dataSent & """fontSize"": ""Size12""," & chr(13)
dataSent = dataSent & """name"": ""Date Signed""," & chr(13)
dataSent = dataSent & """recipientId"": ""1""," & chr(13)
dataSent = dataSent & """tabLabel"": ""date_signed""" & chr(13)
dataSent = dataSent & "}," & chr(13)
dataSent = dataSent & "]," & chr(13)
dataSent = dataSent & """fullNameTabs"": [" & chr(13)
dataSent = dataSent & "{" & chr(13)
dataSent = dataSent & """anchorString"": ""signer1name""," & chr(13)
dataSent = dataSent & """anchorYOffset"": ""-6""," & chr(13)
dataSent = dataSent & """fontSize"": ""Size12""," & chr(13)
dataSent = dataSent & """name"": ""Full Name""," & chr(13)
dataSent = dataSent & """recipientId"": ""1""," & chr(13)
dataSent = dataSent & """tabLabel"": ""Full Name""" & chr(13)
dataSent = dataSent & "}" & chr(13)
dataSent = dataSent & "]," & chr(13)
dataSent = dataSent & """signHereTabs"": [" & chr(13)
dataSent = dataSent & "{" & chr(13)
dataSent = dataSent & """anchorString"": ""signer1sig""," & chr(13)
dataSent = dataSent & """anchorUnits"": ""mms""," & chr(13)
dataSent = dataSent & """anchorXOffset"": ""0""," & chr(13)
dataSent = dataSent & """anchorYOffset"": ""0""," & chr(13)
dataSent = dataSent & """name"": ""Please sign here""," & chr(13)
dataSent = dataSent & """optional"": ""false""," & chr(13)
dataSent = dataSent & """recipientId"": ""1""," & chr(13)
dataSent = dataSent & """scaleValue"": 1," & chr(13)
dataSent = dataSent & """tabLabel"": ""signer1sig""" & chr(13)
dataSent = dataSent & "}" & chr(13)
dataSent = dataSent & "]" & chr(13)
dataSent = dataSent & "}" & chr(13)
dataSent = dataSent & "}" & chr(13)
dataSent = dataSent & "]" & chr(13)
dataSent = dataSent & "}," & chr(13)
dataSent = dataSent & """status"": ""sent""" & chr(13)
dataSent = dataSent & "}"
Set HttpReq = Server.CreateObject("MSXML2.ServerXMLHTTP")
HttpReq.open "POST", baseUrl & "/envelopes", False
HttpReq.SetRequestHeader "Authentication", "Bearer " & token
HttpReq.SetRequestHeader "Accept", "application/json"
HttpReq.SetRequestHeader "Content-type", "application/json"
HttpReq.SetRequestHeader "X-DocuSign-Authentication", "{ ""Username"": """ & usrName & """, ""Password"": """ & usrPwd & """, ""IntegratorKey"": """ & usrIntegKey & """ }"
response.Write(dataSent)
HttpReq.send(dataSent)
'response.Write(HttpReq.ResponseText)
%>
私はすでに計算しましたし、エンコードされた値が有効なbase64のコンテンツである。
誰かがこの上で私を助けてくださいことはできますか?
ファイルへのリンクを投稿してください。ファイルを正しくエンコードしていないようです。 –