Telegex.set_webhook
You're seeing just the function
set_webhook
, go back to Telegex module for more information.
Specs
set_webhook(String.t(), certificate: Telegex.Model.InputFile.t(), ip_address: String.t(), max_connections: integer(), allowed_updates: [String.t()], drop_pending_updates: boolean() ) :: {:ok, boolean()} | {:error, Telegex.Model.errors()}
Use this method to specify a url and receive incoming updates via an outgoing webhook.
Whenever there is an update for the bot, we will send an HTTPS POST request to the specified url,
containing a JSON-serialized Telegex.Model.Update
. In case of an unsuccessful request,
we will give up after a reasonable amount of attempts. Returns True on success.
If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL,
e.g. https://www.example.com/<token>
. Since nobody else knows your bot's token, you can be pretty sure it's us.