﻿---
sidebar_position: 4
---

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

# Delete webhook
 Deletes the bot event handler URL for webhook operation



`Function DeleteWebhook(Val Token) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Bot token |

  
  Returns:  Map Of KeyAndValue - serialized JSON response from Telegram

<br/>

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



```bsl title="1C:Enterprise/OneScript code example"
    Token  = "6129457865:AAFyzNYOAFbu...";
    Result = OPI_Telegram.DeleteWebhook(Token);
```
 

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


```json title="Result"
{
 "ok": true,
 "result": true,
 "description": "Webhook was deleted"
}
```
