I have registered my account in DocuSign and using SOAP interface.I am able to login successfully using the following code.
Login code
var req = new LoginRequest() { Body = body };
var result = credential.Login(req);
if (result.Body != null && result.Body.LoginResult != null)
{
var account = result.Body.LoginResult.Accounts.First();
var BaseUrl = account.BaseUrl;
var AccountId = account.AccountID;
var UserName = account.AccountName;
var Email = account.Email;
}
However, I am getting Unspecified error while creating envelope. Also, Do I need to use the BaseUrl in creating envelope?
Header for request
request = base.GetWebRequest(uri) as HttpWebRequest;
request.Headers.Add("X-DocuSign-Authentication",
string.Format("<DocuSignCredentials><Username>{0}</Username>
<Password>{1}</Password><IntegratorKey>{2}</IntegratorKey></DocuSignCredentials>",
UserName, Password,integratorkey));
Code for creating envelope
//Create new envelope
var envelope = new Envelope();
envelope.AccountId = "***";
envelope.Subject = "envelope subject";
//Create the Receipents
recipient[] recipients;
recipients.Add(new recipient{ .... });
envelope.Recipients = recipients
//Grab and make the Documents
Document[] documents;
documents.Add(new Document{ ... });
envelope.Documents = documents;
var docusignWebService = new DocuSignWebService();
docusignWebService.UserName = "****"; // user email id
docusignWebService.Password = "****"; //user password
docusignWebService.AccountId = "****";
//create envelope
docusignWebService.CreateEnvelope(envelope);
We were using the same code for an enterprise and it was working perfectly, But now its not working for individual account. We are getting an Unspecified_Error and inner exception is null.