.NET 8 or .NET 10, base class library only.
Install
Section titled “Install”dotnet add package OhAuthCat --version 0.0.2- Create a client:
new OhAuthCatClient(. It is disposable.new OhAuthCatOptions { ApiKey = . . . , ClientId = "pk_. . . " }) - Call any API operation, for example
await client., orOrganizations. GetOrganizationAsync( "org_. . . ") await foreachoverListDirectoryUsersAutoPagingAsync(.. . . ) - SSO:
client.returnsSsoHelpers. GetAuthorizationUrl( new AuthorizationOptions { RedirectUri = . . . , Domain = . . . }) UrlandCodeVerifier; thenawait client..SsoHelpers. GetProfileAndTokenAsync( code, verifier, redirectUri) - Webhooks:
Webhooks..Verify( rawBody, request. Headers["OhAuthCat-Signature"], secret) - Errors are
OhAuthCatExceptionsubclasses, such asNotFoundExceptionandRateLimitedException, with the stableCode. - Set your own idempotency key with
RequestOptions..IdempotencyKey