Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Preslav Semov Hadzhitsanev
@preslavsh
@scorpioRED you can do it from the menu on the bot profile
Ilya Sakharchuk
@Vanawy
I send a keyboard with buttons with action type - "open-url" and links in the action body, it works fine on Android and in Desktop app, but does not open the browser on all IOS devices. I tried internal and external mode, but that makes no difference.
Preslav Semov Hadzhitsanev
@preslavsh
@Vanawy can you sent the keyboard json
Ilya Sakharchuk
@Vanawy
@preslavsh Hello, here is full message json
trouble with buttons in rich media
Preslav Semov Hadzhitsanev
@preslavsh
Can you try escaping it here: https://www.urlencoder.org/ , or at least some part of. The only time I had similar issue was because I haven't escaped the content property
@Vanawy
Didn't know "ActionBody":"tel:+111111111" that worked
Ilya Sakharchuk
@Vanawy
@preslavsh oh, thats great suggestion! thanks
Ilya Sakharchuk
@Vanawy
@preslavsh thank you!!!! encoded url works great!
entelostre
@entelostre
Hello mates!
What's the suggested way of implementing chained keyboard responses?
Russtan
@Russtan
i cant deliver messages it is just stuck on the clock icon but i can receive messages please help me this is very very urgent
Preslav Semov Hadzhitsanev
@preslavsh
@Russtan is your domain valid. I had the same issue when my domain was expired.
@entelostre If you are talking about quiz type functionality. I use question_{n}answer{k} as reply message. Then I regex that parses question_[1-9]?answer[1-9]?
k2s
@k2s
is it possible to subscribe bot to a group chat, so that it could give advices based on written text ?
Preslav Semov Hadzhitsanev
@preslavsh
@k2s I dont think so
Preslav Semov Hadzhitsanev
@preslavsh
Hello guys I have created an advanced Viber bot starter, I hope it helps someone. Feel free to ask, suggest, and contribute: https://github.com/preslavsh/viber-bot-node-starter/ Can you give your feedback to it?
papazzzoglo
@papazzzoglo
how to make it work on firebase?
neerajmpndbash
@neerajmpndbash
Hi , I have created a viber community group and i want to find all the user info who is joined this community. I am the superadmin of this community. Do we have any REST API for that to access.
IpsilonS2Hasti
@IpsilonS2Hasti
Hello and Добър ден! I was wondering if there is a way to chain messages and replies with context.
Example:
Me: buy shoes
Bot: choose color
Me: red
Bot: transaction complete
Preslav Semov Hadzhitsanev
@preslavsh
@neerajmpndbash viber community is separate, you dont have api for it
@papazzzoglo what do you mean to work on firebase, you can use firebase as database, but what is your specific need?
@IpsilonS2Hasti I would use buttons to chain them. If you want to input just free text, you can use something like dialogflow or make your own language parsing
papazzzoglo
@papazzzoglo
@preslavsh is there a working example of using viber-bot library on firebase by using cloud function? Request.body in firebase cloud functions is of type Object. When calling createHmac in message-validator.js, an type error occurs - argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Object
Preslav Semov Hadzhitsanev
@preslavsh
@papazzzoglo there is no example for using firebase with cloud functions. I would be happy to help you, just ping me on private message. But my question is how do you maintain chat bot session with cloud functions?
papazzzoglo
@papazzzoglo
@preslavsh session parameters can be stored in the database
Volodymyr Buts
@VolodymyrButs
what am I doing wrong?
Volodymyr Buts
@VolodymyrButs
bot.on(BotEvents.MESSAGE_RECEIVED, (userProfile, response) => {
return response.send([
new TextMessage(
'Hey , select option on bottom',
SAMPLE_KEYBOARD_EN,
null,
null,
null,
3),
new FileMessage(
"https://example.pdf",
330000,
"example.pdf"
),
]);
});
Preslav Semov Hadzhitsanev
@preslavsh
What is the error @VolodymyrButs
Volodymyr Buts
@VolodymyrButs
just dont work! i want send text and file
Volodymyr Buts
@VolodymyrButs
any examples?
RTNFriend
@RTNFriend
I need user to share his phome number with my bot? is it possible? Telegram has such functionality https://core.telegram.org/bots/2-0-intro#locations-and-numbers
Preslav Semov Hadzhitsanev
@preslavsh
RTNFriend
@RTNFriend
Thank you, I know how to implement buttons.... what I am interested in is what functionality I attach to the button so that the user sends his phone number to the bot. getUserDetails(userProfile) is useless because it does not serve the phone number. Intercepting ContactMessage from user is useless as well because user can send anyone's contact to the bot.... I (my bot) really needs functionality like Telegram has, that I posted above. Is it possible it Viber API or Viber Node API? Thanks.
RTNFriend
@RTNFriend
looks like it is indeed possible - the "share-phone" action in "ActionType" for a button, thanks a lot !!
PeceKr
@PeceKr
Is there an option to start a Viber call to a predefined number from a button?
Ilya Sakharchuk
@Vanawy

Thank you, I know how to implement buttons.... what I am interested in is what functionality I attach to the button so that the user sends his phone number to the bot. getUserDetails(userProfile) is useless because it does not serve the phone number. Intercepting ContactMessage from user is useless as well because user can send anyone's contact to the bot.... I (my bot) really needs functionality like Telegram has, that I posted above. Is it possible it Viber API or Viber Node API? Thanks.

As i know in telegram you cant tell defference between contact shared using "request_contact" or just shared with attachment menu

Alpin52
@Alpin52
After running node bot-deploy.js I received error "function " was declared with asteriks in /usr/local/lib/node_modules/now/dist/index.js I removed the asteriks and received next error: index.js:210596 return yield { SyntaxError: Unexpected strict mode reserved word
Alpin52
@Alpin52
I finally ran another version of bot (echo). But I cannot send messages to it or subscribe from my dads phone. Viber shows just pic and name with description and no other buttons. Whats wrong?
Alpin52
@Alpin52
Neither from my phone
Alpin52
@Alpin52
The problem was with webhook. Now i can send messages, but i dont receive the echo messages from bot
Preslav Semov Hadzhitsanev
@preslavsh
Are you messages valid
Guys does anyone know something about the chat bot payments: https://www.viber.com/en/blog/2020-11-23/pay-in-chatbots-backup-media-and-all-thats-new-on-viber/ Have you tried them?
Alpin52
@Alpin52
Webhook is set wo error. But onSubscribe and on message received arent triggered. However sendMessage written explicitly works.
Preslav Semov Hadzhitsanev
@preslavsh
@Alpin52 more context
Alpin52
@Alpin52
Neither Nodejs nor PHP code gets events

Here's a test case I was advised to do from viber support team:
Image 1
Yotam (Viber Support)
January 12, 2021 1:23 PM (UTC+02:00)
Hi Alexey,

Regarding not receiving events, can you please confirm you are not seeing incoming requests that are sent to your webhook from Viber when you send your bot a message?

If that is the case, then to allow us to narrow down the cause of the issue, please try the following test:

  1. Go to https://webhook.site
  2. Copy the Your unique URL (keep the page open in your browser during the next steps).
  3. Use this URL in your set_webhook request and send it.
  4. Send a message to your bot, and check the callback that appears in https://webhook.site

Let us know the result of step #4 and we'll advise on the next steps.

On webhook.site I can see the messages I send from my viber client