yagop / node-telegram-bot-api

Telegram Bot API for NodeJS
MIT License
8.17k stars 1.5k forks source link

Add missing `setWebhook` `secret_token` parameter to the documentation #1083

Closed rznzippy closed 11 months ago

rznzippy commented 1 year ago

Feature Request

I have:

Introduction

Missing documentation of secret_token key of options argument on TelegramBot.setWebhook method. This parameter is supported by Telegram and allows fulfill every request with a secret token that makes it harder to spoof Telegram requests.

Example

const secretToken = '...'; // <!-- your secret token
const bot = new TelegramBot(token, {polling: false});
bot.setWebhook(webhookUrl, {secret_token: secretToken});
cmj2002 commented 1 year ago

Can you also add this to @types/node-telegram-bot-api ?