How to set webhook for Viber Java bot using NGROK?

39 views Asked by At

I am traying to set WEBHOOK to viber bot using NGROK but it return 404. Is it possible in novadays? Considering that ofical java lib is depricated?

@Configuration
public class ViberBotConfig {

    @Bean
    ViberBot viberBot() {
        ViberBot viberBot = new ViberBot("MyViberBotWonderfulWorld", "TOKEN");
        try {
            viberBot.listen("/callback");
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
        // let Viber API know about webhook url
        viberBot.setWebhook("NGROK DOMAIN");
        return viberBot;
    }


}
0

There are 0 answers