Answer the question
In order to leave comments, you need to log in
How to run telegram bot in java?
I'm trying to run a telegram bot which is written in java and which uses the markup language for chatbots AIML. When I enter the bot's token and name, and then try to compile, I get the same error all the time...
The bot's repository itself is third-party - https://github.com/baalajimaestro/Java-AIML-Bot . I just added a couple of AIML scripted dialogs. It is likely that the author explained a possible workaround for this error, it just didn’t reach me.
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 Chatbot.main(Chatbot.java:111)
Caused by: org.telegram.telegrambots.exceptions.TelegramApiRequestException: Error deleting webhook: [401] Unauthorized
at org.telegram.telegrambots.api.methods.updates.DeleteWebhook.deserializeResponse(DeleteWebhook.java:40)
at org.telegram.telegrambots.api.methods.updates.DeleteWebhook.deserializeResponse(DeleteWebhook.java:19)
at org.telegram.telegrambots.bots.DefaultAbsSender.sendApiMethod(DefaultAbsSender.java:689)
at org.telegram.telegrambots.bots.AbsSender.execute(AbsSender.java:53)
at org.telegram.telegrambots.bots.TelegramLongPollingBot.clearWebhook(TelegramLongPollingBot.java:27)
... 2 more
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question