Set Webhook
Set webhook URL for bot event handling in webhook mode
- Parameters
- Advanced call ?
Function SetWebhook(Val Token, Val URL) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Token | --token | String | ✔ | Bot token |
| URL | --url | String | ✔ | Request handling address from Telegram (with https:) |
Returns
Map Of KeyAndValue - serialized JSON response from Telegram
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete structure with fields code, body, and headers |
tip
Method at API documentation: setWebhook
1C:Enterprise/OneScript code example
Token = "6129457865:AAFyzNYOAFbu...";
URL = "https://hut.openintegrations.dev";
Result = OPI_Telegram.SetWebhook(Token, URL);
- Bash
- CMD/Bat
oint telegram SetWebhook \
--token "***" \
--url "https://hut.openintegrations.dev"
oint telegram SetWebhook ^
--token "***" ^
--url "https://hut.openintegrations.dev"
Result
{
"ok": true,
"result": true,
"description": "Webhook was set"
}