From 334e8fb79351229fa1b20c001d49cfc4f8ad7558 Mon Sep 17 00:00:00 2001 From: ivacom Date: Tue, 3 Sep 2024 06:49:30 +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..acf0fe5 --- /dev/null +++ b/setWebhook.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +TOKEN="" +URL="bill.DOMAIN.ru" +SHM_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/shm/v1/telegram/bot/$SHM_TEMPLATE\", + \"allowed_updates\": [] +}"