curl -sS -X POST 'https://matrix.example.com/_synapse/admin/v1/reset_password/@alice:example.com' -H "Authorization: Bearer $ACCESS_TOKEN" -d '{"new_password":"hunter2"}'

Category: Matrix & Synapse

curl -sS -X POST 'https://matrix.example.com/_synapse/admin/v1/reset_password/@alice:example.com' -H "Authorization: Bearer $ACCESS_TOKEN" -d '{"new_password":"hunter2"}'

Reset another user's password via API

Changes the user's password and logs out all their devices by default; add "logout_devices":false to keep sessions alive. This is the same action as the v2 users PUT with a password field, and it is disabled with Matrix Authentication Service. Tell the user to sign in again afterwards. Nothing is sent to the user automatically, so notify them separately.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.