2017-12-27 48 views
3

내가 우체부에서 viber에 메시지를 보내려고하고Viber REST API, 고유 Viber 사용자 ID를 찾는 방법은 무엇입니까? 자원 URL <a href="https://chatapi.viber.com/pa/send_message" rel="nofollow noreferrer">https://chatapi.viber.com/pa/send_message</a></p> <p>일반 메시지 전송

enter image description here

매개 변수. 고유 Viber 사용자 ID를 찾는 방법을 알지 못합니다. 매개 변수가 필요합니다.

나는이 오류가 무엇입니까 :

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

+0

주 코드 – WhatsThePoint

답변

1

대니 다인턴 (Danny Dainton)은 다른 사람이 아니라 자신의 계정에 대한 고유 ID를 포함한 데이터를 얻을 수있는 방법에 관한 문서를 언급했습니다.

사용자가 공개 계정을 구독하는 경우 사용자 고유 ID가 포함 된 콜백이 웹 훅에 전송되며 해당 사용자에게만 메시지를 보낼 수 있습니다.

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 .

0

documentation에서, 그것은 모양이 마음에 수도 사용자 ID의 데이터를 얻을 수 https://chatapi.viber.com/pa/get_account_info에 요청을 보내야합니다.

이 답변은 API에 대해 전혀 알지 못하고 설명서에 대한 기본적인 검색을 수행 한 내용을 기반으로합니다. 질문을하기 전에 할 수 있었던 일.