docusignapi - Docusign .Net Client and Send on Behalf Of(SOBO) -
i trying use send on behalf of (sobo) functionality of docusign. read , know there 2 ways it. using oauth obtain access_token , use with x-docusign-act-as-user or using sendonbehalfof element in x-docusign-authentication.
i use docusign .net client. reading code can see first option not supported (oauth). went x-docusign-authentication supported thru account.sobouserid property.
restsettings.instance.integratorkey = "***"; restsettings.instance.docusignaddress = "http://demo.docusign.net"; restsettings.instance.webserviceurl = restsettings.instance.docusignaddress + "/restapi/v2"; restsettings.instance.resttracing = true; // credentials sending account account account = new account(); account.email = "a@yopmail.com"; account.password = "****"; account.sobouserid = "b@yopmail.com"; // make login api call bool result = account.login(); envelope envelope = new envelope(); envelope.login = account; // assign account info above envelope.recipients = new recipients() { signers = new signer[] { new signer() { email = "****@hotmail.com", name = "test", routingorder = "1", recipientid = "1" }} }; // "sent" send immediately, "created" save envelope draft envelope.status = "sent"; envelope.emailsubject = "docusign test document"; // create new docusign envelope (i.e. server side) result = envelope.create(@"c:\temp\dummypdf.pdf"); i did necessary setup in docusign ui allow sending of behalf of b@yopmail.com shown in documentation. when run code receiver received email a@yopmail.com instead of b@yopmail.com. seems sobo not working @ all.
my question can use sobo functionality using docusign .net client?
thanks.
it seems because of defect in docusign .net client not working. if @ github.com/docusign/docusign-.net-client/blob/master/… method setlogoncredentials - you'll see sendonbehalfof element not added authorization header if authorizationformat xml. made change force json , working now
Comments
Post a Comment