Skip to content

Docusign .NET Client 101

Inbar Gazit edited this page Feb 2, 2015 · 2 revisions

This is just the first attempt at writing some documentation for the library. It would evolve from here.

2 things you need before you can start:

  1. Demo account
  2. integration key

both of the above can be obtained in https://www.docusign.com/developer-center

These should be updated in the configuration section for RestSettings.Instance. and if you just want to make sure they work for unit tests - go to ConfigLoad.cs and update all the fields.

Next steps

You have to have an Account object that would be used to make API calls. All API calls require an identification. So, the first thing to do is call Account.Login() after you have email and password filled for this user.

then this account object should be used for all future API calls. Keep it somewhere handy.

You are now ready to do some envelope operations using the Envelope class. Everytime you work with an Envelope class you need to have the Login field set to an Account object that has already logged in to the system (Login() call from above was run). You can tell by looking at the ApiPassword field and see if it's set.

So, here is some sample code:

        using DocuSign.Integrations.Client;
        //....
        RestSettings.Instance.IntegratorKey = "test-SET-YOUR-REAL-integrator-key-here";
        RestSettings.Instance.WebServiceUrl = "https://demo.docusign.net/restapi/v2";
        RestSettings.Instance.DocuSignAddress = "https://demo.docusign.net";
        var act = new Account();
        act.Password = "password";
        act.Email = "[email protected]";
        act.Login();
        var envelope = new Envelope { Login = act };

// now you're ready to use envelopes, create them, etc. etc.

Clone this wiki locally