-
Notifications
You must be signed in to change notification settings - Fork 1
Home
C# SDK for the EVERFI Foundry API
The Foundry API allows EVERFI partners to manage their organization by adding users, tracking progress, and other features. This C# SDK makes it easy for .NET developers to use the Foundry API.
You can download v1.0.0 of the EVERFI Foundry SDK from NuGet. Currently the SDK works for .NET 4.7.2.
You should get your client id, secret, and endpoint from the Admin Panel. More information can be found in the public API documentation.
Once you have obtained your secrets, you can simply create a new instance of the API. The OAuth is taken care of in the backend.
// Your client id and secret below
// Rather than storing them in plaintext, you can store them with .NET's Secret Manager
string client_id = "";
string client_secret = "";
string endpoint = "";
API foundry = new API(accountSid: client_id, secretKey: client_secret, BaseUrl: endpoint);
You can now interact with the API and all of its functionalities. For SDK methods that interact directly with the API, such as getting or setting a resource, expect that a failed method call will throw a FoundryException. Therefore, be sure to implement try/catch logic for all such SDK method calls as described in FoundryException
. Code samples in this wiki are for simple illustrative purposes and do not always practice this technique or other best practices and defensive coding techniques, but your integration code should do so.