none
Get the Subscribers List From VIBER ? RRS feed

  • Question

  • Hi ,

    I'm using VS2019 , C# and windows forms. I have used the Viber.Bot nuget package for implementing the REST API that the Viber has exposed for sending messages etc.

    I am able to setup a webhook and send a message to myself. But when it comes to broadcast a message to my subscribers list I cannot do that because it requires the Uniques IDs which I don't have .

    Their documentation says that with the callbacks I should get the unique ids but where do I DO THAT ??? How can I "trap" these callbacks ? 

    Let's say that a user sends me a message , the documentation says that it will send a callback with his unique id ...Ok. But where am I suppose to "trap" this response since the Bot is opened in their server ?

    Is there any way to get all the responses in a list ??? and try to parse those?

    I don't want to use a provider to do all these because as far as I saw there are ready solutions which you have to pay a lot of money.

    Can anyone assist me on this ?

    Appreciate your help or guidance 

    Wednesday, January 1, 2020 8:34 AM

All replies

  • Hi zakkar,

    Thank you for posting here.

    Based on your description and the information I searched for, it seems that you want to implement a robot program that can automatically reply.

    Because this program needs to send messages to multiple clients that have subscribed to this service, I think the WinForm program is not suitable for use here.

    You should develop a program similar to WebService, publish it, and then let users access this service in a way similar to "https: // mydomain.com/myViberApi".

    There is an example in this link that might help you:

    How to create a Windows7 application to send a text message.

    Or you can contact the author for help.

    Get in Touch.

    Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Thursday, January 2, 2020 2:56 AM
  • Hi Timon and thank you for your answer ,

    I have tried all of these solutions but the thing is that they need the receiver unique id to make it work.

    Viber docs says that you need a webserver to "trap" the callbacks and I'm trying to do this from localhost at first using c# or I don't know what else.

    Now I'm experimenting with NodeJs and ngrok but with no success so far. The posted examples does not work so I'm kind of stuck here.

    The ngrok works but how can I setup this webserver and trap the events ? Everything that I have found is in  PHP or node...Couldn't find anything in c#

    Can anyone show me or has an example on how to trap these events with ASP >NET ? Webservices? C# ? Something within the Microsoft range.

     Thank you again for your time.

    Thursday, January 2, 2020 7:23 AM
  • Webhooks and REST APIs fall under ASP.NET so you'll need to post over in their forums. In order to receive responses from a webhook you have to have an API (or perhaps web app if you really needed to) listening on a public facing URL that the webhook can call.

    Since VIBER is a third party product we cannot provide much help with that but if they need to call you back using a webhook then you'll need a REST API. WCF wouldn't work in most cases because it is SOAP based and webhooks are HTTP based (in my experience). Please post your question in the ASP.NET forums.


    Michael Taylor http://www.michaeltaylorp3.net

    Thursday, January 2, 2020 3:14 PM
  • OK ,

    I will post it there

    Thank you

    Thursday, January 2, 2020 6:54 PM