(Users )
The user object represents a user that has successfully signed up to your application.
https://clerk.com/docs/reference/clerkjs/user
Returns a list of all users.
The users are returned sorted by creation date, with the newest users appearing first.
using Clerk . BackendAPI ;
using Clerk . BackendAPI . Models . Operations ;
using System . Collections . Generic ;
using Clerk . BackendAPI . Models . Components ;
var sdk = new ClerkBackendApi ( bearerAuth : "<YOUR_BEARER_TOKEN_HERE>" ) ;
GetUserListRequest req = new GetUserListRequest ( ) {
EmailAddress = new List < string > ( ) {
"test@example.com" ,
} ,
PhoneNumber = new List < string > ( ) {
"+12345678901" ,
} ,
ExternalId = new List < string > ( ) {
"external-id-123" ,
} ,
Username = new List < string > ( ) {
"user123" ,
} ,
Web3Wallet = new List < string > ( ) {
"0x123456789abcdef0x123456789abcdef" ,
} ,
UserId = new List < string > ( ) {
"user-id-123" ,
} ,
OrganizationId = new List < string > ( ) {
"org-id-123" ,
} ,
Query = "John" ,
LastActiveAtSince = 1700690400000 ,
Limit = 20 ,
Offset = 10 ,
} ;
var res = await sdk . Users . ListAsync ( req ) ;
// handle response
Parameter
Type
Required
Description
request
GetUserListRequest
✔️
The request object to use for the request.
GetUserListResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
400, 401, 422
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Creates a new user. Your user management settings determine how you should setup your user model.
Any email address and phone number created using this method will be marked as verified.
Note: If you are performing a migration, check out our guide on zero downtime migrations .
A rate limit rule of 20 requests per 10 seconds is applied to this endpoint.
using Clerk . BackendAPI ;
using Clerk . BackendAPI . Models . Operations ;
using System . Collections . Generic ;
using Clerk . BackendAPI . Models . Components ;
var sdk = new ClerkBackendApi ( bearerAuth : "<YOUR_BEARER_TOKEN_HERE>" ) ;
CreateUserRequestBody req = new CreateUserRequestBody ( ) {
ExternalId = "ext-id-001" ,
FirstName = "John" ,
LastName = "Doe" ,
EmailAddress = new List < string > ( ) {
"john.doe@example.com" ,
} ,
PhoneNumber = new List < string > ( ) {
"+12345678901" ,
} ,
Web3Wallet = new List < string > ( ) {
"0x123456789abcdef0x123456789abcdef" ,
} ,
Username = "johndoe123" ,
Password = "Secure*Pass4" ,
PasswordDigest = "$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc" ,
SkipPasswordChecks = false ,
SkipPasswordRequirement = false ,
TotpSecret = "base32totpsecretkey" ,
BackupCodes = new List < string > ( ) {
"123456" ,
"654321" ,
} ,
PublicMetadata = new Dictionary < string , object > ( ) {
{ "role" , "user" } ,
} ,
PrivateMetadata = new Dictionary < string , object > ( ) {
{ "internal_id" , "789" } ,
} ,
UnsafeMetadata = new Dictionary < string , object > ( ) {
{ "preferences" , new Dictionary < string , object > ( ) {
{ "theme" , "dark" } ,
} } ,
} ,
CreatedAt = "2023-03-15T07:15:20.902Z" ,
} ;
var res = await sdk . Users . CreateAsync ( req ) ;
// handle response
Parameter
Type
Required
Description
request
CreateUserRequestBody
✔️
The request object to use for the request.
CreateUserResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
400, 401, 403, 422
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Returns a total count of all users that match the given filtering criteria.
using Clerk . BackendAPI ;
using Clerk . BackendAPI . Models . Operations ;
using System . Collections . Generic ;
using Clerk . BackendAPI . Models . Components ;
var sdk = new ClerkBackendApi ( bearerAuth : "<YOUR_BEARER_TOKEN_HERE>" ) ;
GetUsersCountRequest req = new GetUsersCountRequest ( ) {
EmailAddress = new List < string > ( ) {
"user@example.com" ,
} ,
PhoneNumber = new List < string > ( ) {
"+1234567890" ,
} ,
ExternalId = new List < string > ( ) {
"external-id-123" ,
} ,
Username = new List < string > ( ) {
"username123" ,
} ,
Web3Wallet = new List < string > ( ) {
"0x123456789abcdef" ,
} ,
UserId = new List < string > ( ) {
"user-id-123" ,
} ,
Query = "John Doe" ,
} ;
var res = await sdk . Users . CountAsync ( req ) ;
// handle response
Parameter
Type
Required
Description
request
GetUsersCountRequest
✔️
The request object to use for the request.
GetUsersCountResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
422
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Retrieve the details of a user
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 . Users . GetAsync ( userId : "usr_1" ) ;
// handle response
Parameter
Type
Required
Description
Example
UserId
string
✔️
The ID of the user to retrieve
usr_1
GetUserResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
400, 401, 404
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Update a user's attributes.
You can set the user's primary contact identifiers (email address and phone numbers) by updating the primary_email_address_id
and primary_phone_number_id
attributes respectively.
Both IDs should correspond to verified identifications that belong to the user.
You can remove a user's username by setting the username attribute to null or the blank string "".
This is a destructive action; the identification will be deleted forever.
Usernames can be removed only if they are optional in your instance settings and there's at least one other identifier which can be used for authentication.
This endpoint allows changing a user's password. When passing the password
parameter directly you have two further options.
You can ignore the password policy checks for your instance by setting the skip_password_checks
parameter to true
.
You can also choose to sign the user out of all their active sessions on any device once the password is updated. Just set sign_out_of_other_sessions
to true
.
using Clerk . BackendAPI ;
using Clerk . BackendAPI . Models . Operations ;
using System . Collections . Generic ;
using Clerk . BackendAPI . Models . Components ;
var sdk = new ClerkBackendApi ( bearerAuth : "<YOUR_BEARER_TOKEN_HERE>" ) ;
var res = await sdk . Users . UpdateAsync (
userId : "usr_1" ,
requestBody : new UpdateUserRequestBody ( ) {
ExternalId = "ext_123" ,
FirstName = "Jane" ,
LastName = "Doe" ,
PrimaryEmailAddressId = "eml_12345" ,
NotifyPrimaryEmailAddressChanged = true ,
PrimaryPhoneNumberId = "phn_67890" ,
PrimaryWeb3WalletId = "wlt_123" ,
Username = "janedoe" ,
ProfileImageId = "img_789" ,
Password = "secretPass123!" ,
PasswordDigest = "$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc" ,
SkipPasswordChecks = false ,
SignOutOfOtherSessions = true ,
TotpSecret = "ABCD1234EFGH5678" ,
BackupCodes = new List < string > ( ) {
"123456" ,
"654321" ,
} ,
PublicMetadata = new Dictionary < string , object > ( ) {
{ "theme" , "dark" } ,
} ,
PrivateMetadata = new Dictionary < string , object > ( ) {
{ "vip" , true } ,
} ,
UnsafeMetadata = new Dictionary < string , object > ( ) {
{ "age" , 30 } ,
} ,
DeleteSelfEnabled = true ,
CreateOrganizationEnabled = false ,
CreatedAt = "2021-04-05T14:30:00.000Z" ,
}
) ;
// handle response
Parameter
Type
Required
Description
Example
UserId
string
✔️
The ID of the user to update
usr_1
RequestBody
UpdateUserRequestBody
✔️
N/A
UpdateUserResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
400, 401, 404, 422
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Delete the specified user
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 . Users . DeleteAsync ( userId : "usr_1" ) ;
// handle response
Parameter
Type
Required
Description
Example
UserId
string
✔️
The ID of the user to delete
usr_1
DeleteUserResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
400, 401, 404
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Marks the given user as banned, which means that all their sessions are revoked and they are not allowed to sign in again.
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 . Users . BanAsync ( userId : "user_12345" ) ;
// handle response
Parameter
Type
Required
Description
Example
UserId
string
✔️
The ID of the user to ban
user_12345
BanUserResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
402
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Removes the ban mark from the given user.
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 . Users . UnbanAsync ( userId : "user_12345" ) ;
// handle response
Parameter
Type
Required
Description
Example
UserId
string
✔️
The ID of the user to unban
user_12345
UnbanUserResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
402
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Marks the given user as locked, which means they are not allowed to sign in again until the lock expires.
Lock duration can be configured in the instance's restrictions settings.
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 . Users . LockAsync ( userId : "user_123456789" ) ;
// handle response
Parameter
Type
Required
Description
Example
UserId
string
✔️
The ID of the user to lock
user_123456789
LockUserResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
403
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Removes the lock from the given user.
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 . Users . UnlockAsync ( userId : "user_12345" ) ;
// handle response
Parameter
Type
Required
Description
Example
UserId
string
✔️
The ID of the user to unlock
user_12345
UnlockUserResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
403
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Update a user's profile image
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 . Users . SetProfileImageAsync (
userId : "usr_test123" ,
requestBody : new SetUserProfileImageRequestBody ( ) { }
) ;
// handle response
Parameter
Type
Required
Description
Example
UserId
string
✔️
The ID of the user to update the profile image for
usr_test123
RequestBody
SetUserProfileImageRequestBody
✔️
N/A
SetUserProfileImageResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
400, 401, 404
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Delete a user's profile image
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 . Users . DeleteProfileImageAsync ( userId : "usr_test123" ) ;
// handle response
Parameter
Type
Required
Description
Example
UserId
string
✔️
The ID of the user to delete the profile image for
usr_test123
DeleteUserProfileImageResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
404
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Update a user's metadata attributes by merging existing values with the provided parameters.
This endpoint behaves differently than the Update a user endpoint.
Metadata values will not be replaced entirely.
Instead, a deep merge will be performed.
Deep means that any nested JSON objects will be merged as well.
You can remove metadata keys at any level by setting their value to null
.
using Clerk . BackendAPI ;
using Clerk . BackendAPI . Models . Operations ;
using System . Collections . Generic ;
using Clerk . BackendAPI . Models . Components ;
var sdk = new ClerkBackendApi ( bearerAuth : "<YOUR_BEARER_TOKEN_HERE>" ) ;
var res = await sdk . Users . UpdateMetadataAsync (
userId : "user_123456789" ,
requestBody : new UpdateUserMetadataRequestBody ( ) { }
) ;
// handle response
Parameter
Type
Required
Description
Example
UserId
string
✔️
The ID of the user whose metadata will be updated and merged
user_123456789
RequestBody
UpdateUserMetadataRequestBody
✔️
N/A
UpdateUserMetadataResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
400, 401, 404, 422
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Fetch the corresponding OAuth access token for a user that has previously authenticated with a particular OAuth provider.
For OAuth 2.0, if the access token has expired and we have a corresponding refresh token, the access token will be refreshed transparently the new one will be returned.
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 . Users . GetOAuthAccessTokenAsync (
userId : "user_123" ,
provider : "oauth_google"
) ;
// handle response
Parameter
Type
Required
Description
Example
UserId
string
✔️
The ID of the user for which to retrieve the OAuth access token
user_123
Provider
string
✔️
The ID of the OAuth provider (e.g. oauth_google
)
oauth_google
GetOAuthAccessTokenResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
400, 422
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
GetOrganizationMemberships
Retrieve a paginated list of the user's organization memberships
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 . Users . GetOrganizationMembershipsAsync (
userId : "usr_1234567890" ,
limit : 20 ,
offset : 10
) ;
// handle response
Parameter
Type
Required
Description
Example
UserId
string
✔️
The ID of the user whose organization memberships we want to retrieve
usr_1234567890
Limit
long
➖
Applies a limit to the number of results returned. Can be used for paginating the results together with offset
.
20
Offset
long
➖
Skip the first offset
results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with limit
.
10
UsersGetOrganizationMembershipsResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
403
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
GetOrganizationInvitations
Retrieve a paginated list of the user's organization invitations
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 . Users . GetOrganizationInvitationsAsync (
userId : "<id>" ,
limit : 20 ,
offset : 10 ,
status : Clerk . BackendAPI . Models . Operations . QueryParamStatus . Pending
) ;
// handle response
Parameter
Type
Required
Description
Example
UserId
string
✔️
The ID of the user whose organization invitations we want to retrieve
Limit
long
➖
Applies a limit to the number of results returned. Can be used for paginating the results together with offset
.
20
Offset
long
➖
Skip the first offset
results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with limit
.
10
Status
QueryParamStatus
➖
Filter organization invitations based on their status
UsersGetOrganizationInvitationsResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
400, 403, 404
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Check that the user's password matches the supplied input.
Useful for custom auth flows and re-verification.
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 . Users . VerifyPasswordAsync (
userId : "user_123" ,
requestBody : new VerifyPasswordRequestBody ( ) {
Password = "securepassword123" ,
}
) ;
// handle response
Parameter
Type
Required
Description
Example
UserId
string
✔️
The ID of the user for whom to verify the password
user_123
RequestBody
VerifyPasswordRequestBody
✔️
N/A
VerifyPasswordResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
500
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Verify that the provided TOTP or backup code is valid for the user.
Verifying a backup code will result it in being consumed (i.e. it will
become invalid).
Useful for custom auth flows and re-verification.
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 . Users . VerifyTotpAsync (
userId : "usr_1a2b3c" ,
requestBody : new VerifyTOTPRequestBody ( ) {
Code = "123456" ,
}
) ;
// handle response
Parameter
Type
Required
Description
Example
UserId
string
✔️
The ID of the user for whom to verify the TOTP
usr_1a2b3c
RequestBody
VerifyTOTPRequestBody
✔️
N/A
VerifyTOTPResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
500
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Disable all of a user's MFA methods (e.g. OTP sent via SMS, TOTP on their authenticator app) at once.
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 . Users . DisableMfaAsync ( userId : "user_123456" ) ;
// handle response
Parameter
Type
Required
Description
Example
UserId
string
✔️
The ID of the user whose MFA methods are to be disabled
user_123456
DisableMFAResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
404, 500
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Disable all of a user's backup codes.
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 . Users . DeleteBackupCodeAsync ( userId : "<id>" ) ;
// handle response
Parameter
Type
Required
Description
UserId
string
✔️
The ID of the user whose backup codes are to be deleted.
DeleteBackupCodeResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
404, 500
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Delete the passkey identification for a given user and notify them through email.
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 . Users . DeletePasskeyAsync (
userId : "<id>" ,
passkeyIdentificationId : "<id>"
) ;
// handle response
Parameter
Type
Required
Description
UserId
string
✔️
The ID of the user that owns the passkey identity
PasskeyIdentificationId
string
✔️
The ID of the passkey identity to be deleted
UserPasskeyDeleteResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
403, 404, 500
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Creates a TOTP (Time-based One-Time Password) for a given user, returning both the TOTP secret and the URI.
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 . Users . CreateTotpAsync ( userId : "<id>" ) ;
// handle response
Parameter
Type
Required
Description
UserId
string
✔️
The ID of the user for whom the TOTP is being created.
CreateUserTOTPResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
403, 404, 500
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Deletes all of the user's TOTPs.
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 . Users . DeleteTOTPAsync ( userId : "<id>" ) ;
// handle response
Parameter
Type
Required
Description
UserId
string
✔️
The ID of the user whose TOTPs are to be deleted
DeleteTOTPResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
404, 500
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*
Delete an external account by ID.
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 . Users . DeleteExternalAccountAsync (
userId : "<id>" ,
externalAccountId : "<id>"
) ;
// handle response
Parameter
Type
Required
Description
UserId
string
✔️
The ID of the user's external account
ExternalAccountId
string
✔️
The ID of the external account to delete
DeleteExternalAccountResponse
Error Type
Status Code
Content Type
Clerk.BackendAPI.Models.Errors.ClerkErrors
400, 403, 404, 500
application/json
Clerk.BackendAPI.Models.Errors.SDKError
4XX, 5XX
*/*