We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf301e8 commit f9a90f3Copy full SHA for f9a90f3
examples/unset.php
@@ -0,0 +1,19 @@
1
+<?php
2
+//Composer Loader
3
+$loader = require __DIR__.'/vendor/autoload.php';
4
+
5
+$API_KEY = 'your_bot_api_key';
6
+$BOT_NAME = 'namebot';
7
+try {
8
+ // create Telegram API object
9
+ $telegram = new Longman\TelegramBot\Telegram($API_KEY, $BOT_NAME);
10
+ // set webhook
11
+ $result = $telegram->unsetWebHook();
12
+ //Uncomment to use certificate
13
+ //$result = $telegram->setWebHook($link, $path_certificate);
14
+ if ($result->isOk()) {
15
+ echo $result->getDescription();
16
+ }
17
+} catch (Longman\TelegramBot\Exception\TelegramException $e) {
18
+ echo $e;
19
+}
0 commit comments