Module users_api

Module users_api 

Source

Enums§

BanUserError
struct for typed errors of method ban_user
CreateUserError
struct for typed errors of method create_user
DeleteUserError
struct for typed errors of method delete_user
DisableMfaError
struct for typed errors of method disable_mfa
GetOAuthAccessTokenError
struct for typed errors of method get_o_auth_access_token
GetUserError
struct for typed errors of method get_user
GetUserListError
struct for typed errors of method get_user_list
GetUsersCountError
struct for typed errors of method get_users_count
UnbanUserError
struct for typed errors of method unban_user
UpdateUserError
struct for typed errors of method update_user
UpdateUserMetadataError
struct for typed errors of method update_user_metadata
UsersGetOrganizationMembershipsError
struct for typed errors of method users_get_organization_memberships
VerifyPasswordError
struct for typed errors of method verify_password
VerifyTotpError
struct for typed errors of method verify_totp

Functions§

ban_user
Marks the given user as banned, which means that all their sessions are revoked and they are not allowed to sign in again.
create_user
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.
delete_user
Delete the specified user
disable_mfa
Disable all of a user’s MFA methods (e.g. OTP sent via SMS, TOTP on their authenticator app) at once.
get_o_auth_access_token
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.
get_user
Retrieve the details of a user
get_user_list
Returns a list of all users. The users are returned sorted by creation date, with the newest users appearing first.
get_users_count
Returns a total count of all users that match the given filtering criteria.
unban_user
Removes the ban mark from the given user.
update_user
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.
update_user_metadata
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.
users_get_organization_memberships
Retrieve a paginated list of the user’s organization memberships
verify_password
Check that the user’s password matches the supplied input. Useful for custom auth flows and re-verification.
verify_totp
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.