Enable or disable content protection on a channel or chat
Method schema is available as of layer 135. Switch ยป
Parameters
Name |
Type |
Description |
peer |
InputPeer |
The chat or channel |
enabled |
Bool |
Enable or disable content protection |
Result
Updates
Possible errors
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. |