# messages.getStatsURL

Returns URL with the chat statistics. Currently this method can be used only for channels

No such method in the current schema.

### Parameters

| Name | Type | Description |
| --- | :---: | --- |
| **flags** | [\#](/type/%23) | Flags, see [TL conditional fields](/mtproto/TL-combinators.md#conditional-fields) |
| **dark** | [flags](/mtproto/TL-combinators.md#conditional-fields).0?[true](/constructor/true.md) | Pass true if a URL with the dark theme must be returned |
| **peer** | [InputPeer](/type/InputPeer.md) | Chat identifier |
| **params** | [string](/type/string.md) | Parameters from `tg://statsrefresh?params=******` link |

### Result
[StatsURL](/type/StatsURL.md)

### Possible errors

| Code | Type | Description |
| --- | --- | --- |
| 400 | PEER\_ID\_INVALID | The provided peer id is invalid. |