Resets the E2E key of an encrypted room. For every member who has a key for the room, the current key is moved to their previous room keys, and the latest 10 previous keys are kept. Members other than the authenticated user are added to the room's queue of users waiting for the new key, up to 50 members. The new key is set for the authenticated user.
The authenticated user must have E2E keys, and the room must already be encrypted. Only one reset can run for a room at a time.
Permission required: toggle-room-e2e-encryption
Changelog
| Version | Description |
|---|---|
| 8.3.0 | The 403 response returns error-not-allowed instead of unauthorized |
| 7.0.0 | Added |
The user ID.
The authentication token.
{
"rid": "wCiXndNp5NqNY3uCc",
"e2eKey": "9b7c2e4f1a6dbmV3LWVuY3J5cHRlZC1rZXk",
"e2eKeyId": "9b7c2e4f1a6d"
}The room ID.
The new room key, encrypted with the authenticated user's E2E public key.
The ID of the new room key.
OK
{
"success": true
}Bad Request
{
"success": false,
"error": "must have required property 'e2eKeyId'",
"errorType": "invalid-params"
}{
"success": false,
"error": "error-e2e-key-reset-in-progress"
}{
"success": false,
"error": "error-not-allowed"
}{
"success": false,
"error": "error-e2e-key-reset-failed"
}Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}Forbidden
{
"success": false,
"error": "error-not-allowed"
}