Python viber Bot is not working as described in the documentation. It doesn't give any respond in the viber mobile app

Question:

I have followed the official viber doc, using python:
https://developers.viber.com/docs/api/python-bot-api/

The server has been deployed properly (https) and the set_webhook responds:

{"status":0,"status_message":"ok","chat_hostname":"XX-CHAT-01_","event_types":["subscribed","unsubscribed","webhook","client_status","conversation_started","action","delivered","failed","message","seen"]}

Now, the viber mobile app is not working as expected. The messages are not showed to be delivered (double tick).

Any ideas here?
Has anyone developed a viber bot (python api) and still works?

Thank you!

After deployed the webserver and after setting the webhook, I was expecting the viber mobile app to respond normally.

I have used the official functionality:

# this library supplies a simple way to receive a request object
    viber_request = viber.parse_request(request.get_data())

    if isinstance(viber_request, ViberMessageRequest):
        message = viber_request.message
        # lets echo back
        viber.send_messages(viber_request.sender.id, [
            message
        ])
Asked By: Nikos Epitropakis

||

Answers:

If the Viber messages are not being delivered, there could be several reasons for this issue. Here are a few suggestions:

  1. Check the status of the webhook: Make sure that the webhook is set up properly and that it is still active. You can do this by sending a GET request to the webhook URL.

  2. Check the connection between the server and the Viber platform: Make sure that your server can connect to the Viber platform. You can check this by running a simple test script to send a message to your Viber bot.

  3. Check the permissions of your Viber bot: Make sure that your Viber bot has the necessary permissions to receive and send messages. You can check this by going to the Viber Developer Dashboard and checking the bot’s settings.

  4. Check the Viber app version: Make sure that you have the latest version of the Viber app installed on your mobile device. Older versions of the app may not work properly with the Viber bot.

  5. Contact Viber support: If none of the above suggestions solve the issue, you can contact Viber support for further assistance.

I hope this helps!

Answered By: Jan

UPDATE

After contacting Viber support, it was determined that the issue was related to SSL certificates. Despite having an HTTPS connection using Let’sEncrypt on my server (droplet), there was still an issue, as illustrated in the provided
image:

enter image description here

I was using DigitalOcean droplet.

SOLUTION:

After that I deployed my app on DigitalOcean App Platform that manages automatically the SSL certificates and the issue was resolved!

Answered By: Nikos Epitropakis