GetRecipientView: REST API 错误 ACCOUNT_NOT_AUTHORIZED_FOR_ENVELOPE
GetRecipientView: REST API Error ACCOUNT_NOT_AUTHORIZED_FOR_ENVELOPE
我正在尝试获取收件人 url,但收到 "GetRecipientView REST Error ACCOUNT_NOT_AUTHORIZED_FOR_ENVELOPE #44"。
首先,我正在创建信封以接收发件人 url。然后我调用 GetRecipientView() 来获取收件人视图 url。下面是我使用的代码
public string EmbeddedSenderView(string docId)
{
Account account = InitializeDocSign();
Envelope envelope = new Envelope();
envelope.Login = account;
envelope.EmailSubject = "Please sign document";
envelope.Recipients = new Recipients()
{
signers = new Signer[]
{
new Signer()
{
email = "xxxx@gmail.com",
name = "AV Gmail 1",
routingOrder = "1",
recipientId = "1",
roleName="Signer",
clientUserId="101"
},
},
};
envelope.Create("\FAQ_NMS.pdf");
bool result = envelope.GetSenderView("my domain");
/*Saving document details into Database*/
if (result)
{
ObjDocumentSignRequest obj = new ObjDocumentSignRequest();
obj.DocumentId = docId;
obj.EnvelopeId = envelope.EnvelopeId;
obj.SenderViewUrl = envelope.SenderViewUrl;
eSignUtilities.SaveSignRequest(obj);
}
return envelope.SenderViewUrl;
}
public void EmbeddedRecepientView(string docId)
{
Account account = InitializeDocSign();
Envelope envelope = new Envelope();
envelope.Login = account;
envelope.EmailSubject = "Please sign document";
envelope.Recipients = new Recipients()
{
signers = new Signer[]
{
new Signer()
{
email = "xxxx@gmail.com",
name = "AV Gmail 1",
routingOrder = "1",
recipientId = "1",
roleName="Signer",
clientUserId="101"
},
},
};
envelope.EnvelopeId = "xxxxxxxxxxx";
envelope.UpdateStatus();
bool result = envelope.GetRecipientView("my domain");
有什么帮助吗?
谢谢
AV
您需要先发送信封,然后才能请求签名 URL(即收件人视图)。看起来您正在创建信封,生成嵌入式发送 URL,然后立即尝试生成嵌入式签名 URL。
我在你打电话之前看到 GetRecipientView()
你正在打电话
envelope.UpdateStatus();
但是,我没有看到你设置
envelope.Status = "sent";
...在此之前的任何地方,这意味着您正在请求在处于 draft 状态的信封上嵌入签名 URL,这将产生错误.
使用"GetEmbeddedSignerView"方法解决
Account account = InitializeDocSign();
Envelope envelope = new Envelope();
envelope.Login = account;
// assign the envelope id that was passed in
envelope.EnvelopeId = "xxxxx-xxx-xxx-xx-xxxxxxx";
var signer = new Signer
{
email = "xxxxx@gmail.com",
name = "AV xxxx 1",
clientUserId = "101",
recipientId = "1"
};
// generate the recipient view token
string signingUrl = envelope.GetEmbeddedSignerView("http://www.google.com", signer);
我正在尝试获取收件人 url,但收到 "GetRecipientView REST Error ACCOUNT_NOT_AUTHORIZED_FOR_ENVELOPE #44"。
首先,我正在创建信封以接收发件人 url。然后我调用 GetRecipientView() 来获取收件人视图 url。下面是我使用的代码
public string EmbeddedSenderView(string docId)
{
Account account = InitializeDocSign();
Envelope envelope = new Envelope();
envelope.Login = account;
envelope.EmailSubject = "Please sign document";
envelope.Recipients = new Recipients()
{
signers = new Signer[]
{
new Signer()
{
email = "xxxx@gmail.com",
name = "AV Gmail 1",
routingOrder = "1",
recipientId = "1",
roleName="Signer",
clientUserId="101"
},
},
};
envelope.Create("\FAQ_NMS.pdf");
bool result = envelope.GetSenderView("my domain");
/*Saving document details into Database*/
if (result)
{
ObjDocumentSignRequest obj = new ObjDocumentSignRequest();
obj.DocumentId = docId;
obj.EnvelopeId = envelope.EnvelopeId;
obj.SenderViewUrl = envelope.SenderViewUrl;
eSignUtilities.SaveSignRequest(obj);
}
return envelope.SenderViewUrl;
}
public void EmbeddedRecepientView(string docId)
{
Account account = InitializeDocSign();
Envelope envelope = new Envelope();
envelope.Login = account;
envelope.EmailSubject = "Please sign document";
envelope.Recipients = new Recipients()
{
signers = new Signer[]
{
new Signer()
{
email = "xxxx@gmail.com",
name = "AV Gmail 1",
routingOrder = "1",
recipientId = "1",
roleName="Signer",
clientUserId="101"
},
},
};
envelope.EnvelopeId = "xxxxxxxxxxx";
envelope.UpdateStatus();
bool result = envelope.GetRecipientView("my domain");
有什么帮助吗?
谢谢 AV
您需要先发送信封,然后才能请求签名 URL(即收件人视图)。看起来您正在创建信封,生成嵌入式发送 URL,然后立即尝试生成嵌入式签名 URL。
我在你打电话之前看到 GetRecipientView()
你正在打电话
envelope.UpdateStatus();
但是,我没有看到你设置
envelope.Status = "sent";
...在此之前的任何地方,这意味着您正在请求在处于 draft 状态的信封上嵌入签名 URL,这将产生错误.
使用"GetEmbeddedSignerView"方法解决
Account account = InitializeDocSign();
Envelope envelope = new Envelope();
envelope.Login = account;
// assign the envelope id that was passed in
envelope.EnvelopeId = "xxxxx-xxx-xxx-xx-xxxxxxx";
var signer = new Signer
{
email = "xxxxx@gmail.com",
name = "AV xxxx 1",
clientUserId = "101",
recipientId = "1"
};
// generate the recipient view token
string signingUrl = envelope.GetEmbeddedSignerView("http://www.google.com", signer);