C# DocuSign API和DocumentPDFs docPDFs=apiService.RequestDocumentPDFs(envelopeID);
我正在使用下面的代码连接到DocuSign API。C# DocuSign API和DocumentPDFs docPDFs=apiService.RequestDocumentPDFs(envelopeID);,c#,docusignapi,C#,Docusignapi,我正在使用下面的代码连接到DocuSign API。 我做错了什么,我不断得到用户名和密码不正确时,他们是 String auth = "<DocuSignCredentials><Username>john.connolly@lechase.com</Username><Password>password</Password><IntegratorKey>20be051c-4c25-46c1-b0f1-1f10575a2e
我做错了什么,我不断得到用户名和密码不正确时,他们是
String auth = "<DocuSignCredentials><Username>john.connolly@lechase.com</Username><Password>password</Password><IntegratorKey>20be051c-4c25-46c1-b0f1-1f10575a2e40</IntegratorKey></DocuSignCredentials>";
DSAPIServiceSoapClient client = new DSAPIServiceSoapClient("DSAPIServiceSoap");
using (System.ServiceModel.OperationContextScope scope = new System.ServiceModel.OperationContextScope(client.InnerChannel))
{
System.ServiceModel.Channels.HttpRequestMessageProperty httpRequestProperty = new System.ServiceModel.Channels.HttpRequestMessageProperty();
httpRequestProperty.Headers.Add("X-DocuSign-Authentication", auth);
System.ServiceModel.OperationContext.Current.OutgoingMessageProperties[System.ServiceModel.Channels.HttpRequestMessageProperty.Name] = httpRequestProperty;
EnvelopeStatus status = client.RequestStatusEx("12d46951-1f1c-48cd-9a28-e51685d67ccd");
Console.Out.WriteLine("Subject: " + status.Subject);
}
String auth=“约翰。connolly@lechase.compassword20be051c-4c25-46c1-b0f1-1f10575a2e40”;
DSAPIServiceSoapClient=新的DSAPIServiceSoapClient(“DSAPIServiceSoap”);
使用(System.ServiceModel.OperationContextScope范围=新的System.ServiceModel.OperationContextScope(client.InnerChannel))
{
System.ServiceModel.Channels.HttpRequestMessageProperty httpRequestProperty=新建System.ServiceModel.Channels.HttpRequestMessageProperty();
httpRequestProperty.Headers.Add(“X-DocuSign-Authentication”,auth);
System.ServiceModel.OperationContext.Current.OutgoingMessageProperties[System.ServiceModel.Channel.HttpRequestMessageProperty.Name]=httpRequestProperty;
信封状态=client.RequestStatusEx(“12d46951-1f1c-48cd-9a28-e51685d67ccd”);
Console.Out.WriteLine(“Subject:+status.Subject”);
}
由于您使用(使用X-DocuSign-Authentication标头):
baseUrl
字段为
loginacount
对象的一部分。见https://na1.docusign.net/restapi/v2/accounts/123123123
。你想要
只是https://na1.docusign.net/restapi
ApiClient-ApiClient=新的ApiClient(basePath)代码>
Configuration.Default.AddDefaultHeader
设置验证标头,如示例所示string auth = @"<DocuSignCredentials>
<Username>john.connolly@lechase.com</Username>
<Password>S3cre+p455w0Rd</Password>
<IntegratorKey>20be051c-4c25-46c1-b0f1-1f10575a2e40</IntegratorKey>
</DocuSignCredentials>";
DSAPIServiceSoapClient apiService = new DSAPIServiceSoapClient();
using (var scope = new System.ServiceModel.OperationContextScope(apiService.InnerChannel))
{
var httpRequestProperty = new System.ServiceModel.Channels.HttpRequestMessageProperty();
httpRequestProperty.Headers.Add("X-DocuSign-Authentication", auth);
System.ServiceModel.OperationContext.Current.OutgoingMessageProperties[System.ServiceModel.Channels.HttpRequestMessageProperty.Name] = httpRequestProperty;
EnvelopeStatus envStatus = apiService.CreateAndSendEnvelope(envelope);
return envStatus.EnvelopeID;
}
string auth=@”
厕所。connolly@lechase.com
S3cre+p455w0Rd
20be051c-4c25-46c1-b0f1-1f10575a2e40
";
DSAPIServiceSoapClient apiService=新的DSAPIServiceSoapClient();
使用(var scope=new System.ServiceModel.OperationContextScope(apiService.InnerChannel))
{
var httpRequestProperty=new System.ServiceModel.Channels.HttpRequestMessageProperty();
httpRequestProperty.Headers.Add(“X-DocuSign-Authentication”,auth);
System.ServiceModel.OperationContext.Current.OutgoingMessageProperties[System.ServiceModel.Channel.HttpRequestMessageProperty.Name]=httpRequestProperty;
EnvelopeStatus=apiService.CreateAndSendEnvelope(信封);
返回envStatus.EnvelopeID;
}
由于您使用(使用X-DocuSign-Authentication标头):
baseUrl
字段为
loginacount
对象的一部分。见https://na1.docusign.net/restapi/v2/accounts/123123123
。你想要
只是https://na1.docusign.net/restapi
ApiClient-ApiClient=新的ApiClient(basePath)代码>
Configuration.Default.AddDefaultHeader
设置验证标头,如示例所示string auth = @"<DocuSignCredentials>
<Username>john.connolly@lechase.com</Username>
<Password>S3cre+p455w0Rd</Password>
<IntegratorKey>20be051c-4c25-46c1-b0f1-1f10575a2e40</IntegratorKey>
</DocuSignCredentials>";
DSAPIServiceSoapClient apiService = new DSAPIServiceSoapClient();
using (var scope = new System.ServiceModel.OperationContextScope(apiService.InnerChannel))
{
var httpRequestProperty = new System.ServiceModel.Channels.HttpRequestMessageProperty();
httpRequestProperty.Headers.Add("X-DocuSign-Authentication", auth);
System.ServiceModel.OperationContext.Current.OutgoingMessageProperties[System.ServiceModel.Channels.HttpRequestMessageProperty.Name] = httpRequestProperty;
EnvelopeStatus envStatus = apiService.CreateAndSendEnvelope(envelope);
return envStatus.EnvelopeID;
}
string auth=@”
厕所。connolly@lechase.com
S3cre+p455w0Rd
20be051c-4c25-46c1-b0f1-1f10575a2e40
";
DSAPIServiceSoapClient apiService=新的DSAPIServiceSoapClient();
使用(var scope=new System.ServiceModel.OperationContextScope(apiService.InnerChannel))
{
var httpRequestProperty=new System.ServiceModel.Channels.HttpRequestMessageProperty();
httpRequestProperty.Headers.Add(“X-DocuSign-Authentication”,auth);
System.ServiceModel.OperationContext.Current.OutgoingMessageProperties[System.ServiceModel.Channel.HttpRequestMessageProperty.Name]=httpRequestProperty;
EnvelopeStatus=apiService.CreateAndSendEnvelope(信封);
返回envStatus.EnvelopeID;
}
我有点迷路了,你能给我这个的代码吗?我有点迷路了,你能给我这个的代码吗?