2017-12-27 27 views
3

リソースURL https://chatapi.viber.com/pa/send_messageViber REST API、ユニークなViberユーザーIDを見つける方法?

一般的には、メッセージを送信し、私はポストマンからViberのためにメッセージを送信しようとしています

enter image description here

パラメータ。私はユニークなViberのユーザーIDを見つける方法がわからない、そのパラメータが必要です。

私はこのエラーを取得しています:

{"status":999,"status_message":"Bad receiver ID","message_token":5126721184521938239}

+0

があなたのコードを共有:Viberのドキュメントを1として

WhatsThePoint

答えて

1

Danny Daintonは、自分のアカウントに関する一意のIDを含むデータをどのように取得できるかについて、他の誰かについては言及していませんでした。

ユーザーがパブリックアカウントに加入している場合は、ユーザー固有のIDを含むコールバックをWebhookに送信し、そのユーザーにメッセージを送信できるようになります。

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 .

0

documentationから、それは次のようになりますかもしれユーザIDデータを取得するためにhttps://chatapi.viber.com/pa/get_account_infoにリクエストを送信する必要があります。

この回答は、APIについては何も知らず、ドキュメントの基本的な検索だけに基づいています。疑問を尋ねる前に何かできていたかもしれないこと。

関連する問題