# C# Backend SDK

Check out the new server-side [C# SDK right here](https://github.com/clerk/clerk-sdk-csharp)!

With this launch, C# developers can more easily interface with the [Clerk Backend API](https://clerk.com/docs/reference/backend-api) to manage users, organizations, and sessions.

```csharp
using Clerk.BackendAPI;
using Clerk.BackendAPI.Models.Operations;
using Clerk.BackendAPI.Models.Components;

var sdk = new ClerkBackendApi(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");

var res = await sdk.EmailAddresses.GetAsync(emailAddressId: "email_address_id_example");

// handle response
```

This release also makes it straightforward to authenticate backend requests in ASP.NET, Blazor, and other C# web frameworks:

```csharp
using Clerk.BackendAPI.Helpers.Jwks;
using System;
using System.Net.Http;
using System.Threading.Tasks;

public class UserAuthentication
{
    public static async Task<bool> IsSignedInAsync(HttpRequestMessage request)
    {
        var options = new AuthenticateRequestOptions(
            secretKey: Environment.GetEnvironmentVariable("CLERK_SECRET_KEY"),
            authorizedParties: new string[] { "https://example.com" }
        );

        var requestState = await AuthenticateRequest.AuthenticateRequestAsync(request, options);

        return requestState.isSignedIn();
    }
}
```

You can use NuGet to install the new [`Clerk.BackendAPI`](https://www.nuget.org/packages/Clerk.BackendAPI) module via `dotnet add package Clerk.BackendAPI`. To help you from there, we've prepared [detailed reference documentation](https://github.com/clerk/clerk-sdk-csharp?tab=readme-ov-file#summary) in the SDK's GitHub repository.

_Special thanks to [Speakeasy](https://www.speakeasy.com/) for partnering with us on this SDK release 🎉_!
