From 2c4d162949c4963af0536ff4786eb8fb4d6d1b9b Mon Sep 17 00:00:00 2001 From: ivacom Date: Tue, 3 Sep 2024 06:51:23 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20setWebhook.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setWebhook.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 setWebhook.sh diff --git a/setWebhook.sh b/setWebhook.sh new file mode 100644 index 0000000..77c741d --- /dev/null +++ b/setWebhook.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +TOKEN="" +URL="bill.DOMAIN.ru" +IVCM_TEMPLATE="telegram_bot" + +curl https://api.telegram.org/bot${TOKEN}/deleteWebhook?drop_pending_updates=True + +curl -X POST \ + -H 'content-type: application/json' \ + https://api.telegram.org/bot${TOKEN}/setWebhook \ + -d " +{ + \"url\": \"https://$URL/ivcm/v1/telegram/bot/$IVCM_TEMPLATE\", + \"allowed_updates\": [] +}" \ No newline at end of file