From 8bae8e40bd92137c1d8e9421620925cf4a894206 Mon Sep 17 00:00:00 2001 From: DESMG-ShenLin <773933146@qq.com> Date: Sun, 26 Jun 2022 19:04:37 +0800 Subject: [PATCH] add secret_token MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://core.telegram.org/bots/api#setwebhook ``` A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request, 1-256 characters. Only characters A-Z, a-z, 0-9, _ and - are allowed. The header is useful to ensure that the request comes from a webhook set by you. ``` --- src/Telegram.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Telegram.php b/src/Telegram.php index bf006c5f..91ca4ef9 100644 --- a/src/Telegram.php +++ b/src/Telegram.php @@ -1063,6 +1063,7 @@ public function setWebhook(string $url, array $data = []): ServerResponse 'max_connections', 'allowed_updates', 'drop_pending_updates', + 'secret_token', ])); $data['url'] = $url;