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
])
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:
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!