订阅并与 Viber Bot 交流

发布于 2025-01-11 08:21:30 字数 709 浏览 0 评论 0原文

我按照 Viber Python Bot 教程创建了一个机器人:

https://developers .viber.com/docs/api/python-bot-api/

我已经按照本教程使用 Ngrok 部署了本地服务器:

https://developers.viber.com/blog/2017/ 05/24/test-your-bots-locally

我的问题:

  1. 当我尝试使用 Ngrok 提供的 url 调用 set_webhook API 方法时,我收到此错误:

    异常:失败,状态:999,消息:数据库失败

    我可以做什么来解决这个问题?

  2. 据我了解,我可以使用此机器人向订阅此机器人的 Viber 用户发送消息。

    用户如何订阅我的机器人?我可以在消息选项卡中看到该机器人,但无法订阅或向其发送消息。

I followed the Viber Python Bot Tutorial to create a bot:

https://developers.viber.com/docs/api/python-bot-api/

I have deployed a local server using Ngrok, following this tutorial:

https://developers.viber.com/blog/2017/05/24/test-your-bots-locally

My problems:

  1. When I try to call the set_webhook API method with the url provided by Ngrok, I get this error:

    Exception: failed with status: 999, message: DB Failure

    What can I do to fix that?

  2. From what I understand I can use this bot to send messages to Viber users who have subscribed to this bot.

    How can a user subscribe to my bot? I can see the bot in my messages tab, but I can't subscribe or send a message to it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

枕梦 2025-01-18 08:21:30

首先,“set_webhook”应该与 SSL、启动并运行的服务器“链接”(使用 ngrok 应该没问题)。

现在,为了让用户订阅 Viber 机器人,用户需要初始化对话。例如,如果用户编写第一条消息,他将看到他已订阅的通知。 (这是针对 GDPR 和反垃圾邮件潜在问题。)

First of all the "set_webhook" should be "linked" with a SSL, up and running server (using ngrok should be fine).

Now, in order a user to subscribe to a viber bot, the user needs to initialize a conversation. For example if the user writes the first message, he will see a notification that he has subscribed. (this is for GDPR and anti-spamming potential issues.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文