Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing setWebhook secret_token parameter to the documentation #1083

Closed
rznzippy opened this issue May 10, 2023 · 1 comment · Fixed by #1084
Closed

Add missing setWebhook secret_token parameter to the documentation #1083

rznzippy opened this issue May 10, 2023 · 1 comment · Fixed by #1084

Comments

@rznzippy
Copy link
Contributor

Feature Request

I have:

  • searched for such a feature request ( enhancement ) and found none

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});
rznzippy added a commit to rznzippy/node-telegram-bot-api that referenced this issue May 10, 2023
@cmj2002
Copy link

cmj2002 commented Jul 12, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants