We’ve been hard at work updating our C# SDK and code examples. You may have seen that we announced a release candidate version of our C# client library that supports .NET Standard 2.0. We have since moved it to GA (general availability) and we’re creating lots of code examples to get you started.
As a basic primer, Microsoft .NET Standard 2.0 is a specification that enables the ability to write a single software library and have it work in both .NET Core and .NET Framework applications, which is exactly what we’ve done. With C# being our most popular SDK, we’ve listened to your requests and have released our new C# SDK to target .NET Standard 2.0, beginning with version 3.0.0.
A plethora of code examples coming
We’re covering the most common scenarios using our latest OAuth technologies and best practices, starting with JSON Web Token (JWT) authentication. JWT is used for service integrations, where no user is present at a computer, and therefore cannot log in interactively. You can read more information about REST API Authentication.
The JWT code examples are on GitHub in two separate repos – one for C# .NET Core, and one for C# .NET Framework, each packaged as a complete Visual Studio solution/project structure. Each of these two repos contain these three code examples:
- How to perform JWT OAuth authentication
- How to send envelopes via email
- How to list envelopes
The code examples that we’re publishing on GitHub include a launcher framework that lets you actually run the code to see how it works in real-time, set breakpoints, debug, or copy/paste the working code into your own project.
The basic process for running the GitHub code examples (with more specific directions in the README.md file) is:
- Download the code from the desired GitHub repo
- Open the Visual Studio solution
- Ensure you have a DocuSign Sandbox account
- Ensure you have configured an Integrator key for JWT in your sandbox account
- Enter your integrator key and configuration info into the config file
- Run the launcher
- Enjoy (this is a very important step, so don’t miss this one)
This is what the C# JWT example looks like when it is running:
And the beat goes on…
We’re not stopping there. Our team is hard at work producing more content and code examples to make you productive – fast! We’re also working to make all of the code examples available in each of our supported programming languages. We’ll place them on GitHub (to include the launcher) and also in the Developer Center for easy reference.
Please check out the code examples mentioned in this blog post and drop me a line at tony dot mann at docusign.com (modified to avoid SPAM bots) to let us know how we’re doing and if you have any suggestions for additional content you’d like to see.