Send message from Viber bot to subscribed user
Since you have an webhookNotSet
error message you should configure your bot to have one:
...
viber = Api(BotConfiguration(
name='PythonSampleBot',
avatar='http://www.clker.com/cliparts/3/m/v/Y/E/V/small-red-apple-hi.png',
auth_token='xxx-xxx-xxx'
))
viber.set_webhook(webhook_url)
...
webhook_url
should be the one your flask server is reachable by.
You aren't supposed to use self-signed certificate.
I can recommend Let's Encrypt service as convenient and free way to get an SSL certificate for your domain.
Or you can use ngrok for local development or deploy it to Heroku (it gives HTTPS domain for free).