---
sidebar_position: 2
description: Unban and other functions to work with Telegram in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Telegram]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Unban
 Unbans a previously banned user



`Function Unban(Val Token, Val ChatID, Val UserID) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Bot token |
  | ChatID | --chat | String, Number | &#x2714; | Target chat ID or ChatID*TopicID |
  | UserID | --user | String, Number | &#x2714; | Target user ID |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Telegram

:::tip
Method at API documentation: [unbanChatMember](https://core.telegram.org/bots/api#unbanchatmember)
:::
<br/>


```bsl title="1C:Enterprise/OneScript code example"
    Token     = "6129457865:AAFyzNYOAFbu...";
    UserID    = "461699897";
    ChannelID = "@testsichee";

    Result = OPI_Telegram.Unban(Token, ChannelID, UserID);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint telegram Unban \
             --token "***" \
             --chat "***" \
             --user "461699897"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint telegram Unban ^
             --token "***" ^
             --chat "***" ^
             --user "461699897"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 "ok": true,
}
```
