Viber REST API, how to find Unique Viber user id?

Danny Dainton mentioned the docs on how you can get data including unique ID about your own account not about somebody else!

You'll receive callbacks containing user unique ID to your webhook if a user subscribes to your public account, and ONLY THEN you'll be able to send message to that user.

As per viber docs:

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).

and VERY IMPORTANT

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.

Tags:

Api

Postman

Viber