Machine-readable version of this page: /method/messages.setHistoryTTL.md.
Set maximum Time-To-Live of all messages in the specified chat
Method schema is available as of layer 124. Switch ยป
| Name | Type | Description |
|---|---|---|
| peer | InputPeer | The dialog |
| period | int | Automatically delete all messages sent in the chat after this many seconds |
| 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. |
| 400 | TTL_PERIOD_INVALID | The specified TTL period is invalid. |