# channels.deleteUserHistory

Delete all messages sent by a certain user in a [supergroup](/api/channel.md)

No such method in the current schema.

### Parameters

| Name | Type | Description |
| --- | :---: | --- |
| **channel** | [InputChannel](/type/InputChannel.md) | [Supergroup](/api/channel.md) |
| **user\_id** | [InputUser](/type/InputUser.md) | User whose messages should be deleted |

### Result
&nbsp;

### Possible errors

| Code | Type | Description |
| --- | --- | --- |
| 400 | CHANNEL\_INVALID | The provided channel is invalid. |
| 400 | CHANNEL\_PRIVATE | You haven't joined this channel/supergroup. |
| 403 | CHAT\_ADMIN\_REQUIRED | You must be an admin in this chat to do this. |
| 403 | CHAT\_WRITE\_FORBIDDEN | You can't write in this chat. |
| 400 | MSG\_ID\_INVALID | Invalid message ID provided. |
| 400 | USER\_ID\_INVALID | The provided user ID is invalid. |

### Related pages

#### [Channels, supergroups, gigagroups and basic groups](/api/channel.md)
How to handle channels, supergroups, gigagroups, basic groups, and what's the difference between them.