gpt4 book ai didi

api - Viber REST API,如何找到唯一的 Viber 用户 ID?

转载 作者:行者123 更新时间:2023-12-03 06:35:30 25 4
gpt4 key购买 nike

资源网址 https://chatapi.viber.com/pa/send_message

通用发送消息参数

enter image description here

我正在尝试从 Postman 向 viber 发送消息。我不知道如何找到唯一 Viber 用户 ID,该参数是必需的。

我收到此错误:
{"status":999,"status_message":"Bad receiver ID","message_token":5126721184521938239}

最佳答案

Danny Dainton 提到了有关如何获取数据的文档,包括有关您自己帐户的唯一 ID,而不是有关其他人的数据!

如果用户订阅了您的公共(public)帐户,您将收到包含用户唯一 ID 到您的 webhook 的回调,并且只有这样您才能向该用户发送消息。

根据 viber 文档:

The send_message API allows accounts to send messages to Viber users who subscribe to the account. Sending a message to a user will be possible only after the user has subscribed to the Public Account by pressing the subscribe button or by sending a message, or by sending a message to a bot (see subscribed callback for additional information).



非常重要

Before an account can send messages to a user, the user will need to subscribe to the account. Subscribing can take place in one of two ways:

User sends message to the account (both Public Accounts and bots)

  • when a user sends its first message to a account the user will be automatically subscribed to the account. Sending the first message will not trigger a subscribe callback, only a message callback (see receive message from user section). Subscribed event is sent to the Public Account (Public Accounts only)

  • user clicks a subscribe button which triggers the subscribe callback as described below.

关于api - Viber REST API,如何找到唯一的 Viber 用户 ID?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47988814/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com