Stytch.net
2.4.0
See the version list below for details.
dotnet add package Stytch.net --version 2.4.0
NuGet\Install-Package Stytch.net -Version 2.4.0
<PackageReference Include="Stytch.net" Version="2.4.0" />
<PackageVersion Include="Stytch.net" Version="2.4.0" />
<PackageReference Include="Stytch.net" />
paket add Stytch.net --version 2.4.0
#r "nuget: Stytch.net, 2.4.0"
#:package Stytch.net@2.4.0
#addin nuget:?package=Stytch.net&version=2.4.0
#tool nuget:?package=Stytch.net&version=2.4.0
Stytch dotnet Library
The Stytch .NET library makes it easy to use the Stytch user infrastructure API in .NET applications.
Install
Using .NET CLI:
dotnet add package Stytch.net
Usage
You can find your API credentials in the Stytch Dashboard.
This client library supports all of Stytch's live products:
B2C
- Email Magic Links
- Embeddable Magic Links
- OAuth logins
- SMS passcodes
- WhatsApp passcodes
- Email passcodes
- Session Management
- WebAuthn
- User Management
- Time-based one-time passcodes (TOTPs)
- Crypto wallets
- Passwords
- M2M
B2B
- Organizations
- Members
- RBAC
- Email Magic Links
- OAuth logins
- Session Management
- Single-Sign On
- Discovery
- Passwords
- SMS OTP (MFA)
- M2M
Example B2C usage
Create an API client:
using Stytch.net.Clients;
var client = new Stytch.net.Clients.ConsumerClient(new ClientConfig
{
ProjectId = "project-live-c60c0abe-c25a-4472-a9ed-320c6667d317",
ProjectSecret = "secret-live-80JASucyk7z_G8Z-7dVwZVGXL5NT_qGAQ2I="
});
Send a magic link by email:
client.OTPs.Email.LoginOrCreate(new OTPsEmailLoginOrCreateRequest(email: "sandbox@stytch.com"){
LoginMagicLinkUrl = "https://example.com/authenticate",
SignupMagicLinkUrl = "https://example.com/authenticate"
});
Authenticate the token from the magic link:
client.MagicLinks.Authenticate(new AuthenticateRequest(token: "DOYoip3rvIMMW5lgItikFK-Ak1CfMsgjuiCyI7uuU94="));
Example B2B usage
Create an API client:
using Stytch.net.Clients;
var client = new Stytch.net.Clients.B2BClient(new ClientConfig
{
ProjectId = "project-live-c60c0abe-c25a-4472-a9ed-320c6667d317",
ProjectSecret = "secret-live-80JASucyk7z_G8Z-7dVwZVGXL5NT_qGAQ2I="
});
Create an organization
client.Organizations.Create(new B2BOrganizationsCreateRequest(organizationName: "Acme Co"){
OrganizationSlug = "acme-co",
EmailAllowedDomains = ["acme.co"],
EmailJITProvisioning = "RESTRICTED"
});
Log the first user into the organization
client.MagicLinks.Email.LoginOrSignup(new B2BMagicLinksEmailLoginOrSignupRequest(){
OrganizationId = "organization-id-from-create-response-...",
EmailAddress = "admin@acme.co",
}));
Support
If you've found a bug, open an issue!
If you have questions or want help troubleshooting, join us in Slack or email support@stytch.com.
If you've found a security vulnerability, please follow our responsible disclosure instructions.
Development
See DEVELOPMENT.md
Code of Conduct
Everyone interacting in the Stytch project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- Microsoft.IdentityModel.Tokens (>= 8.1.2)
- Newtonsoft.Json (>= 13.0.3)
- System.IdentityModel.Tokens.Jwt (>= 8.1.2)
- System.Net.Http (>= 4.3.4)
-
.NETStandard 2.0
- Microsoft.IdentityModel.Tokens (>= 8.1.2)
- Newtonsoft.Json (>= 13.0.3)
- System.IdentityModel.Tokens.Jwt (>= 8.1.2)
- System.Net.Http (>= 4.3.4)
-
net8.0
- Microsoft.IdentityModel.Tokens (>= 8.1.2)
- Newtonsoft.Json (>= 13.0.3)
- System.IdentityModel.Tokens.Jwt (>= 8.1.2)
- System.Net.Http (>= 4.3.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
2.10.0 | 200 | 9/11/2025 |
2.9.0 | 111 | 9/11/2025 |
2.8.0 | 126 | 9/10/2025 |
2.7.0 | 248 | 8/29/2025 |
2.6.0 | 175 | 8/28/2025 |
2.5.0 | 198 | 8/27/2025 |
2.4.0 | 175 | 8/27/2025 |
2.3.0 | 186 | 8/25/2025 |
2.2.1 | 120 | 8/25/2025 |
2.2.0 | 215 | 8/14/2025 |
2.1.0 | 162 | 8/12/2025 |
2.0.1 | 303 | 8/6/2025 |
2.0.0 | 216 | 8/6/2025 |
1.3.0 | 22,614 | 10/29/2024 |
1.2.2 | 121 | 10/25/2024 |
1.2.1 | 162 | 10/24/2024 |
1.2.0 | 108 | 10/24/2024 |
1.1.0 | 131 | 10/14/2024 |
1.0.0 | 155 | 10/4/2024 |