Enable or disable content protection on a channel or chat
Method schema is available as of layer 223. Switch »
| Name | Type | Description |
|---|---|---|
| flags | # | Flags, see TL conditional fields |
| peer | InputPeer | The chat or channel |
| enabled | Bool | Enable or disable content protection |
| request_msg_id | flags.0?int |
| Code | Type | Description |
|---|---|---|
| 400 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
| 400 | CHAT_NOT_MODIFIED | No changes were made to chat information because the new information you passed is identical to the current information. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |