removing old webhook

See original GitHub issue

so I do long polling bot with 3.6.1 not even hello world one my bot class is

public class My_Bot extends TelegramLongPollingBot {
    @Override
public void onUpdateReceived(Update update) {
}
    @Override
    public String getBotUsername() {
        return "";
    }
    @Override
    public String getBotToken() {
        return "";        
    }
}

and my main

public class Main {
    public static void main(String[] args) {
        try {
            ApiContextInitializer.init();
            TelegramBotsApi botsApi = new TelegramBotsApi();
            botsApi.registerBot((LongPollingBot) new My_Bot());
        } catch (TelegramApiException e) {
            e.printStackTrace();
        }
    }
}

say to run and get

org.telegram.telegrambots.exceptions.TelegramApiRequestException: Error removing old webhook
	at org.telegram.telegrambots.bots.TelegramLongPollingBot.clearWebhook(TelegramLongPollingBot.java:32)
	at org.telegram.telegrambots.TelegramBotsApi.registerBot(TelegramBotsApi.java:120)
	at Main.main(Main.java:14)
Caused by: org.telegram.telegrambots.exceptions.TelegramApiException: Unable to execute deleteWebhook method
	at org.telegram.telegrambots.bots.DefaultAbsSender.sendApiMethod(DefaultAbsSender.java:691)
	at org.telegram.telegrambots.bots.AbsSender.execute(AbsSender.java:53)
	at org.telegram.telegrambots.bots.TelegramLongPollingBot.clearWebhook(TelegramLongPollingBot.java:27)

It all means???

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:18 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
grigory-lobkovcommented, Nov 4, 2019

@kilinochi Thanks for advice! Now it work’s! Code for copy-past to main() method:

    System.getProperties().put("proxySet", "true");

    System.getProperties().put("socksProxyHost", "127.0.0.1");

    System.getProperties().put("socksProxyPort", "9150");
4reactions
kilinochicommented, Apr 2, 2019

btw, if you from Russia or another country where Telegram is blocked

You can also do this Don’t forget open TorBrowser image

Read more comments on GitHub >

github_iconTop Results From Across the Web

removeWebhook - Telegram Bot API - PHP SDK
Use this method to remove a previously set outgoing webhook. This is a helper method from the SDK. The Official API doesn't support...
Read more >
Remove webhook - API Reference
An empty response will be returned when the webhook was successfully deleted. ... Returns an error if the application does not have the...
Read more >
Removal of Webhook plugin - Enterprise Agility Solution
If you are still using the old Webhook plugin, it is now time to migrate all profiles to Automation Rules. The Webhook plugin...
Read more >
Delete a webhook endpoint - Stripe API reference
An object with the deleted webhook endpoints's ID. Otherwise, this call an error, such as if the webhook endpoint has already been deleted....
Read more >
Remove or modify a webhook? - Ask for Help - Glide Community
I know it's not the answer you're looking for, but at the moment it's not possible to edit/delete webhooks. 1 Like. fpsware March...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found