2023-08-18 06:17:19 -04:00
#### User Account Commands ####
1) **Deactivate a user account.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> This function disables a specific user's account, making it unusable for the owner.
2023-08-18 07:57:14 -04:00
2023-08-18 08:48:46 -04:00
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#deactivate-account
2023-08-18 06:17:19 -04:00
2) **Deactivate multiple user accounts.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> Allows you to disable several user accounts at once. Requires a room list file with room_ids separated by newlines, see the example [./examples/room_list.txt](./examples/room_list.txt) file.
2023-08-18 06:17:19 -04:00
3) **Create a user account.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> Use this to generate a new user account.
2023-08-18 07:57:14 -04:00
2023-08-18 08:48:46 -04:00
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#create-or-modify-account
2023-08-18 06:17:19 -04:00
4) **Create multiple user accounts.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> This facilitates the creation of several user accounts simultaneously. Requires a user list file with user_ids separated by newlines, see the example [./examples/user_list.txt](./examples/user_list.txt) file.
2023-08-18 06:17:19 -04:00
5) **Reset a user's password.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> If a user forgets their password, this function helps set a new one.
2023-08-18 07:57:14 -04:00
2023-08-18 08:48:46 -04:00
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#reset-password
2023-08-18 06:17:19 -04:00
6) **Whois user account.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:48:46 -04:00
> This API returns information about the active sessions for a specific user.
2023-08-18 07:57:14 -04:00
2023-08-18 08:48:46 -04:00
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#query-current-sessions-for-a-user
2023-08-18 06:17:19 -04:00
7) **Whois multiple user accounts.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> Retrieves detailed information for multiple user accounts at once. Requires a user list file with user_ids separated by newlines, see the example [./examples/user_list.txt](./examples/user_list.txt) file.
2023-08-18 06:17:19 -04:00
8) **Query user account.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> Allows you to get specific details or attributes of a user account.
2023-08-18 07:57:14 -04:00
2023-08-18 08:48:46 -04:00
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#query-user-account
2023-08-18 06:17:19 -04:00
9) **Query multiple user accounts.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> Retrieve specific details for several user accounts simultaneously. Requires a user list file with user_ids separated by newlines, see the example [./examples/user_list.txt](./examples/user_list.txt) file.
2023-08-18 06:17:19 -04:00
10) **List room memberships of user.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> Displays the list of rooms that a user is a part of.
2023-08-18 07:57:14 -04:00
2023-08-18 08:48:46 -04:00
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#list-room-memberships-of-a-user
2023-08-18 06:17:19 -04:00
11) **Promote a user to server admin.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> Elevates a user's privileges, making them an administrator on the server.
2023-08-18 07:57:14 -04:00
2023-08-18 08:48:46 -04:00
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#change-whether-a-user-is-a-server-administrator-or-not
2023-08-18 06:17:19 -04:00
12) **List all user accounts.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> Displays or prints to file a comprehensive list of all user accounts on the server.
2023-08-18 07:57:14 -04:00
https://matrix-org.github.io/synapse/v1.38/admin_api/user_admin_api.html#list-accounts
2023-08-18 06:17:19 -04:00
13) **Quarantine all media a user uploaded.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> This API quarantines all local media that a local user has uploaded. That is to say, if you would like to quarantine media uploaded by a user on a remote homeserver, you should instead use one of the other APIs. Useful for potential harmful or inappropriate content.
2023-08-18 07:57:14 -04:00
2023-08-18 08:48:46 -04:00
https://matrix-org.github.io/synapse/latest/admin_api/media_admin_api.html#quarantining-all-media-of-a-user
2023-08-18 06:17:19 -04:00
14) **Collect account data.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> Retrieves all available data associated with a user's account.
2023-08-18 06:17:19 -04:00
15) **List account pushers.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> Shows devices and services that have push access to a user's account.
2023-08-18 07:57:14 -04:00
2023-08-18 08:48:46 -04:00
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#list-all-pushers
2023-08-18 06:17:19 -04:00
16) **Get rate limit of a user account.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> Displays the frequency at which a user can make requests or actions.
2023-08-18 07:57:14 -04:00
2023-08-18 08:48:46 -04:00
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#get-status-of-ratelimit
2023-08-18 06:17:19 -04:00
17) **Set rate limit of a user account.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> Adjusts the frequency rate at which a user can make requests or actions.
2023-08-18 07:57:14 -04:00
2023-08-18 08:48:46 -04:00
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#set-ratelimit
2023-08-18 06:17:19 -04:00
18) **Delete rate limit of a user account.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> Removes any rate limits set on a user's account, granting them unrestricted action frequency.
2023-08-18 07:57:14 -04:00
2023-08-18 08:48:46 -04:00
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#delete-ratelimit
2023-08-18 06:17:19 -04:00
19) **Check if user account exists.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> Verifies the existence of a specific user_id, for example "@johndoe:example.org" on the homeserver.
2023-08-18 06:17:19 -04:00
20) **Shadow ban a user.**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> Shadow-banning is a useful tool for moderating malicious or egregiously abusive users. A shadow-banned users receives successful responses to their client-server API requests, but the events are not propagated into rooms. This can be an effective tool as it (hopefully) takes longer for the user to realise they are being moderated before pivoting to another account.
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> Shadow-banning a user should be used as a tool of last resort and may lead to confusing or broken behaviour for the client. A shadow-banned user will not receive any notification and it is generally more appropriate to ban or kick abusive users. A shadow-banned user will be unable to contact anyone on the server.
2023-08-18 07:57:14 -04:00
2023-08-18 08:48:46 -04:00
https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#controlling-whether-a-user-is-shadow-banned
2023-08-18 06:17:19 -04:00
21) **Find a user by their 3PID (Third-party ID).**
2023-08-18 07:57:14 -04:00
2023-08-18 08:04:16 -04:00
> Allows you to locate a user based on their third-party identifiers, such as email or phone number.
2023-08-18 06:17:19 -04:00
2023-08-18 08:04:16 -04:00
**Note:** All these commands utilize the Synapse API. Always exercise caution and ensure you have the necessary permissions when accessing and modifying user accounts.