UsersApi class

Constructors

UsersApi(Dio _dio, Serializers _serializers)
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

attachDeviceId({required InlineObject15 inlineObject15, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Attach mobile device Attach a mobile device id to the currently logged in session. This will enable push notifications for a user, if configured by the server. ##### Permissions Must be authenticated.
autocompleteUsers({required String name, String? teamId, String? channelId, int? limit = 100, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<UserAutocomplete>>
Autocomplete users Get a list of users for the purpose of autocompleting based on the provided search term. Specify a combination of `team_id` and `channel_id` to filter results further. ##### Permissions Requires an active session and `view_team` and `read_channel` on any teams or channels used to filter the results further.
checkUserMfa({required InlineObject11 inlineObject11, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<InlineResponse2002>>
Check MFA Check if a user has multi-factor authentication active on their account by providing a login id. Used to check whether an MFA code needs to be provided when logging in. ##### Permissions No permission required.
convertBotToUser({required String botUserId, required InlineObject107 inlineObject107, bool? setSystemAdmin = false, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Convert a bot into a user Convert a bot into a user. Minimum server version: 5.26 ##### Permissions Must have `manage_system` permission.
convertUserToBot({required String userId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Convert a user into a bot Convert a user into a bot. Minimum server version: 5.26 ##### Permissions Must have `manage_system` permission.
createUser({required InlineObject2 inlineObject2, String? t, String? iid, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<User>>
Create a user Create a new user on the system. Password is required for email login. For other authentication types such as LDAP or SAML, auth_data and auth_service fields are required. ##### Permissions No permission required for creating email/username accounts on an open server. Auth Token is required for other authentication types such as LDAP or SAML.
createUserAccessToken({required String userId, required InlineObject19 inlineObject19, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<UserAccessToken>>
Create a user access token Generate a user access token that can be used to authenticate with the Mattermost REST API. Minimum server version: 4.1 ##### Permissions Must have `create_user_access_token` permission. For non-self requests, must also have the `edit_other_users` permission.
deleteUser({required String userId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Deactivate a user account. Deactivates the user and revokes all its sessions by archiving its user object. As of server version 5.28, optionally use the `permanent=true` query parameter to permanently delete the user for compliance reasons. To use this feature `ServiceSettings.EnableAPIUserDeletion` must be set to `true` in the server's configuration. ##### Permissions Must be logged in as the user being deactivated or have the `edit_other_users` permission.
demoteUserToGuest({required String userId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Demote a user to a guest Convert a regular user into a guest. This will convert the user into a guest for the whole system while retaining their existing team and channel memberships. Minimum server version: 5.16 ##### Permissions Must be logged in as the user or have the `demote_to_guest` permission.
disableUserAccessToken({required InlineObject21 inlineObject21, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Disable personal access token Disable a personal access token and delete any sessions using the token. The token can be re-enabled using `/users/tokens/enable`. Minimum server version: 4.4 ##### Permissions Must have `revoke_user_access_token` permission. For non-self requests, must also have the `edit_other_users` permission.
enableUserAccessToken({required InlineObject22 inlineObject22, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Enable personal access token Re-enable a personal access token that has been disabled. Minimum server version: 4.4 ##### Permissions Must have `create_user_access_token` permission. For non-self requests, must also have the `edit_other_users` permission.
generateMfaSecret({required String userId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<InlineResponse2001>>
Generate MFA secret Generates an multi-factor authentication secret for a user and returns it as a string and as base64 encoded QR code image. ##### Permissions Must be logged in as the user or have the `edit_other_users` permission.
getChannelMembersWithTeamDataForUser({required String userId, int? page, int? pageSize, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<BuiltList<ChannelMemberWithTeamData>>>
Get all channel members from all teams for a user Get all channel members from all teams for a user. Minimum server version: 6.2.0 ##### Permissions Logged in as the user, or have `edit_other_users` permission.
getDefaultProfileImage({required String userId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<void>>
Return user's default (generated) profile image Returns the default (generated) user profile image based on user_id string parameter. ##### Permissions Must be logged in. Minimum server version: 5.5
getKnownUsers({CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<UsersStats>>
Get user IDs of known users Get the list of user IDs of users with any direct relationship with a user. That means any user sharing any channel, including direct and group channels. ##### Permissions Must be authenticated. Minimum server version: 5.23
getProfileImage({required String userId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<void>>
Get user's profile image Get a user's profile image based on user_id string parameter. ##### Permissions Must be logged in.
getSessions({required String userId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<BuiltList<Session>>>
Get user's sessions Get a list of sessions by providing the user GUID. Sensitive information will be sanitized out. ##### Permissions Must be logged in as the user being updated or have the `edit_other_users` permission.
getTotalUsersStats({CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<UsersStats>>
Get total count of users in the system Get a total count of users in the system. ##### Permissions Must be authenticated.
getTotalUsersStatsFiltered({String? inTeam, String? inChannel, bool? includeDeleted, bool? includeBots, String? roles, String? channelRoles, String? teamRoles, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<UsersStats>>
Get total count of users in the system matching the specified filters Get a count of users in the system matching the specified filters. Minimum server version: 5.26 ##### Permissions Must have `manage_system` permission.
getUploadsForUser({required String userId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<BuiltList<UploadSession>>>
Get uploads for a user Gets all the upload sessions belonging to a user. Minimum server version: 5.28 ##### Permissions Must be logged in as the user who created the upload sessions.
getUser({required String userId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<User>>
Get a user Get a user a object. Sensitive information will be sanitized out. ##### Permissions Requires an active session but no other permissions.
getUserAccessToken({required String tokenId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<UserAccessTokenSanitized>>
Get a user access token Get a user access token. Does not include the actual authentication token. Minimum server version: 4.1 ##### Permissions Must have `read_user_access_token` permission. For non-self requests, must also have the `edit_other_users` permission.
getUserAccessTokens({int? page = 0, int? perPage = 60, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<BuiltList<UserAccessTokenSanitized>>>
Get user access tokens Get a page of user access tokens for users on the system. Does not include the actual authentication tokens. Use query parameters for paging. Minimum server version: 4.7 ##### Permissions Must have `manage_system` permission.
getUserAccessTokensForUser({required String userId, int? page = 0, int? perPage = 60, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<BuiltList<UserAccessTokenSanitized>>>
Get user access tokens Get a list of user access tokens for a user. Does not include the actual authentication tokens. Use query parameters for paging. Minimum server version: 4.1 ##### Permissions Must have `read_user_access_token` permission. For non-self requests, must also have the `edit_other_users` permission.
getUserAudits({required String userId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<BuiltList<Audit>>>
Get user's audits Get a list of audit by providing the user GUID. ##### Permissions Must be logged in as the user or have the `edit_other_users` permission.
getUserByEmail({required String email, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<User>>
Get a user by email Get a user object by providing a user email. Sensitive information will be sanitized out. ##### Permissions Requires an active session and for the current session to be able to view another user's email based on the server's privacy settings.
getUserByUsername({required String username, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<User>>
Get a user by username Get a user object by providing a username. Sensitive information will be sanitized out. ##### Permissions Requires an active session but no other permissions.
getUsers({int? page = 0, int? perPage = 60, String? inTeam, String? notInTeam, String? inChannel, String? notInChannel, String? inGroup, bool? groupConstrained, bool? withoutTeam, bool? active, bool? inactive, String? role, String? sort, String? roles, String? channelRoles, String? teamRoles, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<BuiltList<User>>>
Get users Get a page of a list of users. Based on query string parameters, select users from a team, channel, or select users not in a specific channel. Since server version 4.0, some basic sorting is available using the `sort` query parameter. Sorting is currently only supported when selecting users on a team. ##### Permissions Requires an active session and (if specified) membership to the channel or team being selected from.
getUsersByGroupChannelIds({required BuiltList<String> requestBody, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<InlineResponse200>>
Get users by group channels ids Get an object containing a key per group channel id in the query and its value as a list of users members of that group channel. The user must be a member of the group ids in the query, or they will be omitted from the response. ##### Permissions Requires an active session but no other permissions. Minimum server version: 5.14
getUsersByIds({required BuiltList<String> requestBody, int? since, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<BuiltList<User>>>
Get users by ids Get a list of users based on a provided list of user ids. ##### Permissions Requires an active session but no other permissions.
getUsersByUsernames({required BuiltList<String> requestBody, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<BuiltList<User>>>
Get users by usernames Get a list of users based on a provided list of usernames. ##### Permissions Requires an active session but no other permissions.
getUserTermsOfService({required String userId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<UserTermsOfService>>
Fetches user's latest terms of service action if the latest action was for acceptance. Will be deprecated in v6.0 Fetches user's latest terms of service action if the latest action was for acceptance. Minimum server version: 5.6 ##### Permissions Must be logged in as the user being acted on.
login({required InlineObject inlineObject, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<User>>
Login to Mattermost server
loginByCwsToken({required InlineObject1 inlineObject1, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<void>>
Auto-Login to Mattermost server using CWS token CWS stands for Customer Web Server which is the cloud service used to manage cloud instances. ##### Permissions A Cloud license is required
logout({CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Logout from the Mattermost server
migrateAuthToLdap({InlineObject26? inlineObject26, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<void>>
Migrate user accounts authentication type to LDAP. Migrates accounts from one authentication provider to another. For example, you can upgrade your authentication provider from email to LDAP. Minimum server version: 5.28 ##### Permissions Must have `manage_system` permission.
migrateAuthToSaml({InlineObject27? inlineObject27, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<void>>
Migrate user accounts authentication type to SAML. Migrates accounts from one authentication provider to another. For example, you can upgrade your authentication provider from email to SAML. Minimum server version: 5.28 ##### Permissions Must have `manage_system` permission.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patchUser({required String userId, required InlineObject5 inlineObject5, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<User>>
Patch a user Partially update a user by providing only the fields you want to update. Omitted fields will not be updated. The fields that can be updated are defined in the request body, all other provided fields will be ignored. ##### Permissions Must be logged in as the user being updated or have the `edit_other_users` permission.
permanentDeleteAllUsers({CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<void>>
Permanent delete all users Permanently deletes all users and all their related information, including posts. Minimum server version: 5.26.0 Local mode only: This endpoint is only available through local mode.
promoteGuestToUser({required String userId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Promote a guest to user Convert a guest into a regular user. This will convert the guest into a user for the whole system while retaining any team and channel memberships and automatically joining them to the default channels. Minimum server version: 5.16 ##### Permissions Must be logged in as the user or have the `promote_guest` permission.
publishUserTyping({required String userId, InlineObject25? inlineObject25, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<void>>
Publish a user typing websocket event. Notify users in the given channel via websocket that the given user is typing. Minimum server version: 5.26 ##### Permissions Must have `manage_system` permission to publish for any user other than oneself.
registerTermsOfServiceAction({required String userId, required InlineObject24 inlineObject24, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Records user action when they accept or decline custom terms of service Records user action when they accept or decline custom terms of service. Records the action in audit table. Updates user's last accepted terms of service ID if they accepted it. Minimum server version: 5.4 ##### Permissions Must be logged in as the user being acted on.
resetPassword({required InlineObject9 inlineObject9, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Reset password Update the password for a user using a one-use, timed recovery code tied to the user's account. Only works for non-SSO users. ##### Permissions No permissions required.
revokeAllSessions({required String userId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Revoke all active sessions for a user Revokes all user sessions from the provided user id and session id strings. ##### Permissions Must be logged in as the user being updated or have the `edit_other_users` permission. Minimum server version: 4.4
revokeSession({required String userId, required InlineObject14 inlineObject14, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Revoke a user session Revokes a user session from the provided user id and session id strings. ##### Permissions Must be logged in as the user being updated or have the `edit_other_users` permission.
revokeSessionsFromAllUsers({CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<void>>
Revoke all sessions from all users. For any session currently on the server (including admin) it will be revoked. Clients will be notified to log out users. Minimum server version: 5.14 ##### Permissions Must have `manage_system` permission.
revokeUserAccessToken({required InlineObject20 inlineObject20, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Revoke a user access token Revoke a user access token and delete any sessions using the token. Minimum server version: 4.1 ##### Permissions Must have `revoke_user_access_token` permission. For non-self requests, must also have the `edit_other_users` permission.
searchUserAccessTokens({required InlineObject23 inlineObject23, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<BuiltList<UserAccessTokenSanitized>>>
Search tokens Get a list of tokens based on search criteria provided in the request body. Searches are done against the token id, user id and username. Minimum server version: 4.7 ##### Permissions Must have `manage_system` permission.
searchUsers({required InlineObject3 inlineObject3, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<BuiltList<User>>>
Search users Get a list of users based on search criteria provided in the request body. Searches are typically done against username, full name, nickname and email unless otherwise configured by the server. ##### Permissions Requires an active session and `read_channel` and/or `view_team` permissions for any channels or teams specified in the request body.
sendPasswordResetEmail({required InlineObject13 inlineObject13, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Send password reset email Send an email containing a link for resetting the user's password. The link will contain a one-use, timed recovery code tied to the user's account. Only works for non-SSO users. ##### Permissions No permissions required.
sendVerificationEmail({required InlineObject17 inlineObject17, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Send verification email Send an email with a verification link to a user that has an email matching the one in the request body. This endpoint will return success even if the email does not match any users on the system. ##### Permissions No permissions required.
setDefaultProfileImage({required String userId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Delete user's profile image Delete user's profile image and reset to default image based on user_id string parameter. ##### Permissions Must be logged in as the user being updated or have the `edit_other_users` permission. Minimum server version: 5.5
setProfileImage({required String userId, required MultipartFile image, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Set user's profile image Set a user's profile image based on user_id string parameter. ##### Permissions Must be logged in as the user being updated or have the `edit_other_users` permission.
switchAccountType({required InlineObject18 inlineObject18, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<InlineResponse2003>>
Switch login method Switch a user's login method from using email to OAuth2/SAML/LDAP or back to email. When switching to OAuth2/SAML, account switching is not complete until the user follows the returned link and completes any steps on the OAuth2/SAML service provider. To switch from email to OAuth2/SAML, specify `current_service`, `new_service`, `email` and `password`. To switch from OAuth2/SAML to email, specify `current_service`, `new_service`, `email` and `new_password`. To switch from email to LDAP/AD, specify `current_service`, `new_service`, `email`, `password`, `ldap_ip` and `new_password` (this is the user's LDAP password). To switch from LDAP/AD to email, specify `current_service`, `new_service`, `ldap_ip`, `password` (this is the user's LDAP password), `email` and `new_password`. Additionally, specify `mfa_code` when trying to switch an account on LDAP/AD or email that has MFA activated. ##### Permissions No current authentication required except when switching from OAuth2/SAML to email.
toString() String
A string representation of this object.
inherited
updateUser({required String userId, required InlineObject4 inlineObject4, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<User>>
Update a user Update a user by providing the user object. The fields that can be updated are defined in the request body, all other provided fields will be ignored. Any fields not included in the request body will be set to null or reverted to default values. ##### Permissions Must be logged in as the user being updated or have the `edit_other_users` permission.
updateUserActive({required String userId, required InlineObject7 inlineObject7, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Update user active status Update user active or inactive status. Since server version 4.6, users using a SSO provider to login can be activated or deactivated with this endpoint. However, if their activation status in Mattermost does not reflect their status in the SSO provider, the next synchronization or login by that user will reset the activation status to that of their account in the SSO provider. Server versions 4.5 and before do not allow activation or deactivation of SSO users from this endpoint. ##### Permissions User can deactivate themselves. User with `manage_system` permission can activate or deactivate a user.
updateUserAuth({required String userId, required UserAuthData userAuthData, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<UserAuthData>>
Update a user's authentication method Updates a user's authentication method. This can be used to change them to/from LDAP authentication for example. Minimum server version: 4.6 ##### Permissions Must have the `edit_other_users` permission.
updateUserMfa({required String userId, required InlineObject10 inlineObject10, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Update a user's MFA Activates multi-factor authentication for the user if `activate` is true and a valid `code` is provided. If activate is false, then `code` is not required and multi-factor authentication is disabled for the user. ##### Permissions Must be logged in as the user being updated or have the `edit_other_users` permission.
updateUserPassword({required String userId, required InlineObject12 inlineObject12, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Update a user's password Update a user's password. New password must meet password policy set by server configuration. Current password is required if you're updating your own password. ##### Permissions Must be logged in as the user the password is being changed for or have `manage_system` permission.
updateUserRoles({required String userId, required InlineObject6 inlineObject6, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Update a user's roles Update a user's system-level roles. Valid user roles are &quot;system_user&quot;, &quot;system_admin&quot; or both of them. Overwrites any previously assigned system-level roles. ##### Permissions Must have the `manage_roles` permission.
verifyUserEmail({required InlineObject16 inlineObject16, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<StatusOK>>
Verify user email Verify the email used by a user to sign-up their account with. ##### Permissions No permissions required.
verifyUserEmailWithoutToken({required String userId, CancelToken? cancelToken, Map<String, dynamic>? headers, Map<String, dynamic>? extra, ValidateStatus? validateStatus, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress}) Future<Response<User>>
Verify user email by ID Verify the email used by a user without a token. Minimum server version: 5.24 ##### Permissions Must have `manage_system` permission.

Operators

operator ==(Object other) bool
The equality operator.
inherited