Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Santhosh Raju
@SanthoshRaju91
This would catch the actual error so it can be shown in console, instead of the weird warning.
Santhosh Raju
@SanthoshRaju91
Hi, is there a way to set some parameters in the user object while sending a response and getting the same parameter in the next subsequent from the same user.
This is might sound like usual use case, if you want to set a preferred color or any token variables for the user and get that same token in the subsequent request, instead of saving these less important variables in a REDIS / backend DB.
Has anyone ever had a scenario like this ??
Georgios Spanos
@spaniakos
the API is based on the REST API, you make a call and then you get a response.
each call has the same data. i think the only option is to use the tracking data to get some values back and forth
haven't tried it.
igor-teresco
@igor-teresco
Hello All!
Can somebody tell me if it is possible to send files not from URL but from device using https://chatapi.viber.com/pa/send_message endpoint?
Santhosh Raju
@SanthoshRaju91
Thanks @spaniakos for the info
@igor-teresco you mean to send file from Viber bot ??
igor-teresco
@igor-teresco
@SanthoshRaju91 yes, from a Debian server
all bot examples I saw where using URL to send pictures or files.
Santhosh Raju
@SanthoshRaju91

I have an issue that I need to report with viber-bot-node npm package. Couldn't raise a issue in github since the maintainer has disabled raising any issues.

I'm using google app engine to tunnel my requests to localhost instead of using ngrok.

But the request never ever reaches the express routes set in the package, because the below if condition fails

const serverSideSignature = request.headers.X_Viber_Content_Signature || request.query.sig;
if (!messageValidatorService.validateMessage(serverSideSignature, request.body)) {
      self._logger.warn("Could not validate message signature", serverSideSignature);
      return;
    }

With requests like this the headers usually have hypenated property values and so the X._Viber_Content_Signature would be request.headers["x-viber-content-signature"].

Because of this the requests never reach defined express routes

I'm okay with raising a PR as well, just wanted to know. If this makes senses ??
Santhosh Raju
@SanthoshRaju91
@igor-teresco if your Debian server is serving the public assets or in this case the pictures you can provide the relative path references to the files your trying to send
Screen Shot 2019-04-10 at 2.33.50 PM.png
Something like this, our java jetty server is serving these images. Sorry it's absolute path I get confused
igor-teresco
@igor-teresco
@SanthoshRaju91 so a internally running webserver would be ok? or it needs to be public accessible?
Santhosh Raju
@SanthoshRaju91
Yes it should be publicly accessible. If I'm not wrong ( would like the community to correct me). The Viber bot does not have any context of your source code logic, except for the API you are exposing either publicly or via some tunnelling or port forwarding.
igor-teresco
@igor-teresco
Is there a way to control the way API tries to deliver a message? I often see that it repeats a message if bot doesn't answer after 1 second.
Santhosh Raju
@SanthoshRaju91
From the viber-bot's npm package. I don't see any retry logics written. Hard to say if the platform is doing the retry
Sorry hard to say from this point of view
igor-teresco
@igor-teresco
will introduce some "spam" protection then :-)
Marek Vavrecan
@vavrecan
hello! I was wondering, how do you apply for public profile API? I am getting This account does not exist or has been removed error.
I followed link from documentation - https://chats.viber.com/public-accounts/en
Timur Rakhmatillaev
@Eskat0n
@vavrecan You can apply using following link: https://partners.viber.com/
Hello! I'm quite new to Viber's API so maybe my question is little bit naive. Is it possible to somehow "add" bot to group chat to cater that chat users need?
orlove
@orlove
Hi, if you send a message with a link through REST API, then the link is displayed without an image (og:image). How to send links with images?
And on the desktop version of Viber all links with images. The problem is relevant only on mobile versions of the application.
Vedad Burgic
@bvedad
Hi. I send invitation to my friend to subscribe on my public account but he has no option for subscribe? Someone knows what is it?
jbbrrrdddd
@jbbrrrdddd
Hi, is there a way to close a Viber internal browser automatically?
@bvedad Eventually, there is no option for subscribe in Viber(iOS/Android). However there is a subscribe button on Viber(Windows/Mac)
jbbrrrdddd
@jbbrrrdddd
Or does anyone knows what browser viber is using internally? cause I can't seem to close it programatically
Yojj
@Yojj
hello! I want Used local file from '/open/some/file.txt' to as 'FileMessage object '. It is possible?
Hamsterwish
@Hamsterwish
Hi guyz, hope you can help me. How I can run my viber bot, I need to upload my bot on server or what? And if yes any glue when I can find additional information. Thanks a lot)
thethtun-mmds
@thethtun-mmds

Hey @Hamsterwish
You can follow the steps described in
https://github.com/Viber/sample-bot-isitup

or here
https://developers.viber.com/

I have deployed the sample project bot provided by viber on https://zeit.co/now
But I don't see "Message" action button in bot

"Setup Inbox" option works fine. After setting up with a few service providers, it works. But how to make "Message" button appear with "Customized Bot"

thethtun-mmds
@thethtun-mmds
Nevermind. After a few tweak here and there, it works now.
Successfully deployed Is it up sample project on heroku.
duy98-technology
@duy98-technology
I have created a BOT to send messages to individual users. Now I want to use that BOT to send message to a Viber group. Please help me
Preslav Semov Hadzhitsanev
@preslavsh
@duy98-technology I assume that you already have Viber token and you want to broadcast messages as push notifications or you want a bot to answer you?
duy98-technology
@duy98-technology
@preslavsh I want Bot to answer me
thenna
@thenna
Hi - Just came to know that there will be no more public accounts and its going to only communities. Can the API communicate to Viber Communites?
lvlonstradamus
@lvlonstradamus

need help

from https://developers.viber.com/

Clone the sample repository

$ git clone https://github.com/Viber/sample-bot-isitup

Go into the repository

$ cd sample-bot-isitup

Install the dependencies and run

$ npm install && npm run publish

Viber Sample Bot Deployment Helper: How would you like to deploy the script?
1 for https://heroku.com
2 for https://now.sh
: 2

Deploying ~/projects/sample-bot-isitup under lvlonstradamus
Using project sample-bot-isitup
Error! Your package.json file is missing a build property inside the script property.
More details: https://zeit.co/docs/v2/advanced/platform/frequently-asked-questions#missing-build-script

what i need building? its just nodejs script

dont work by default ((
Mikhail
@mikhailrojo
Hello guys
cannot find any link to get TOKEN
please help me out
https://viber.github.io/ no register button or smthing
Preslav Semov Hadzhitsanev
@preslavsh
Preslav Semov Hadzhitsanev
@preslavsh
@mikhailrojo
@duy98-technology did you manage to run it
Preslav Semov Hadzhitsanev
@preslavsh
I have the following problem, broadcasting keyboard message doesn't show up, when the user has been offline and comes back again, but it works if he is online when the broadcast has been done.
thethtun-mmds
@thethtun-mmds
By any chance, does anyone know how to publish viber bot so that other people can access it?