Follow

GetSigningLinks - C#

Last updated 2017-08-15 13:51:20 UTC

// DocumentNOW V2 GetSigningLinks example

// force TLS 1.2 if .net < 4.6
ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
Guid accountContextID = new Guid(<fromYourAccount>); Guid documentID = new Guid(<savedFromYourSubmission>); Guid authToken = new Guid(<savedFromYourSubmission>);
// assuming we set the namespace on the service proxy to DocNow ... DocNow.LinkServiceClient linker = new DocNow.LinkServiceClient("BasicHttpBinding_ILinkService"); DocNow.GetSigningLinksRequest linkrequest = new DocNow.GetSigningLinksRequest(); linkrequest.DocumentId = documentID; linkrequest.DocumentAuthToken = authToken; linkrequest.ContextIdentifier = accountContextID; // this is significant if signers are signing in sequential steps linkrequest.IncludeOnlyCurrentSigners = true; linkrequest.IsAuthenticated = false; // quirk of .net proxy, we are setting this to true to indicate we are NOT passing an envelopeID, but a documentID is present linkrequest.DocumentIdSpecified = true; // ditto linkrequest.DocumentAuthTokenSpecified = true; // this is expiration we would like to set on the signing link, NOT the document linkrequest.LinkExpirationDate = DateTime.Today.AddHours(24); linkrequest.LinkExpirationDateSpecified = true;

DocNow.GetSigningLinksResult linksresult = linker.GetSigningLinks(linkrequest); if (linksresult.Exceptions != null) { StringBuilder sb = new StringBuilder(); foreach (DocNow.LinkException exception in linksresult.Exceptions) { sb.AppendFormat("{0} : {1}{2}", exception.Severity.ToString(), exception.Value, Environment.NewLine); } Console.WriteLine(sb.ToString()); } else { // spit out the link for each signer foreach (DocNow.SigningLink link in linksresult.SigningLinks) { // depending on how the signer was setup, we may need to identify them by email OR their phone number Console.WriteLine(link.SignatoryEmail.Length > 0 ? link.SignatoryEmail : link.SignatoryMobilePhone); Console.WriteLine(link.Url); } }
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.