The WorkOS library for .NET provides convenient access to the WorkOS API from applications using .NET. Supports .NET Standard 2.0+ and .NET Framework 4.6.1+
See the API Reference for .NET usage examples.
There are several options to install the WorkOS .NET SDK.
nuget install WorkOS.net
dotnet add package WorkOS.net
Install-Package WorkOS.net
To use the WorkOS client, you must provide an API key from the WorkOS dashboard.
WorkOS.SetApiKey("sk_key123");
You can also optionally provide a custom HttpClient.
var client = new WorkOSClient(
new WorkOSOptions
{
ApiKey = "sk_key123",
HttpClient = ...,
});
WorkOS.WorkOSClient = client;
Run all tests with the following command:
dotnet test test/WorkOSTests/WorkOSTests.csproj
Run tests for a specific framework with the following command:
dotnet test test/WorkOSTests/WorkOSTests.csproj -f netcoreapp3.1