Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
zlatkos94
@zlatkos94
maybe.. i was always use POST method .
McFck
@McFck
А как тогда получить id пользователя, который только что открыл чат с ботом
Я видел некоторые это смогли провернуть
Andrei Letyushov
@AndreiLetyushov

Hi guys, can you help me with share button on the keyboard in viber bot?
I try with next button:
"ActionType": "open-url",
"ActionBody": "viber://forward?text=viber://pa?chatURI=<chatURI>",
"Text": "Share with friends"

Friend receive correct link to chat, bit it appears ugly, without logo and welcome message, only url. How I can send share message like a viber native share function?

Andrei Letyushov
@AndreiLetyushov
@McFck через request.user.id
Denis
@cellmon
@AndreiLetyushov It not possible and not official information. I make and use special minilanding page for my bot.
McFck
@McFck
request.user.id выдает ошибку
Denis
@cellmon
@McFck Вы А id его словили методом Conversation_started ?
McFck
@McFck
Можно на примере пожалуйста?
Denis
@cellmon

@McFck Да смотрите тут рабочий функциональный код на REST API:

1) viber = json.loads(request.body.decode('utf-8')) # загружаем прилетевший с серверов вайбера запрос

2) обьявляем функцию convers:

if viber['event'] == 'conversation_started':
user = viber['user']['id']

3) Если обычное сообщение пишет юзер боту то:
user = viber['sender']['id']

eventus2
@eventus2
Приветствую! Возможно ли инициализировать видозвонок используя чат-бота? Предусмотренно ли это в API?
Sergey Novozhilov
@OtecAbsolut
Нет(( только сообщения
Eliott Hauteclair
@eliottha
Exception: failed with status: 1, message: Result[HttpRequest[POST / HTTP/1.1]@40c9d4e8 > HttpResponse[null 0 null]@4d9acdd2] java.util.concurrent.TimeoutException: Total timeout elapsed
Hello, getting this while the webhook is up and working
McFck
@McFck
А можно через питон какой-нибудь костыль сделать для conversation_started ?
Denis
@cellmon

@McFck костыль в каком смысле:)
conversation_started это самый первый viber['event']
Это самый первый event, по нему мы:
1) предварительно сохраняем подписчика в БД
2) также по нему при желании можем понять откуда пришел пользователь (реферальку детектировать)
3) также по нему - мы выдаем пользователю ответ на его привычном языке (заранее в коде это предусмотрев)

Велосипед - да если хотите !
Но костылем я это не называл б :)

Denis
@cellmon
@eliottha See you code where webhook ?
Roberto Dardanos
@dardanos
I have the webhook and bot working but I don't know how to send a message to it.
It doesn't show up when I search in Discover and I have read that I need to have 6 followers to have a public account.
I'm totally lost
I got a webhook event type for which I replied with an "ok, 200".
Denis
@cellmon

Happy New Year to all!

@dardanos
1) You need the first method - 'conversation_started'
2) Discover no possible on viber at least 6 followers at least 1006.....
They decide whether to look for you or not.
I have more than 2500 follovers -
Search and Discover not available

Don't back down and don't give up!
This is a very big world.

Roberto Dardanos
@dardanos
@cellmon how do I send a message from my viber account to the bot?
I can't get the conversation_started because I can't send a message
Thanks for your help and happy new year
Preslav Semov Hadzhitsanev
@preslavsh
@eliottha you domain is not reachable, i had the same problem recently. check dns records
Denis
@cellmon
@dardanos
It seems to me that your webhook does not work!
If you show the link to the bot - and I will say about it for sure 100%
stado-y
@stado-y
Hello! Is there some way to invite bot into group?
Roberto Dardanos
@dardanos
Thanks @cellmon I found my problem
Now I'm hiting a different one
Rich media is supported from api version 2
Preslav Semov Hadzhitsanev
@preslavsh
@stado-y not possible
@dardanos when do you hit that, have you tried to increase the api version of message?
Roberto Dardanos
@dardanos
Thanks @preslavsh I did what you mentioned and everything seems to be working
I wish viber was like facebook and will have better default styles for things like buttons.
I need to find colors for things I know will look different for different users depending on their background color
Denis
@cellmon

@dardanos Background color in bot not possible change!

Colors and fonts on buttons and inline buttons - no problem.

zlatkos94
@zlatkos94
How to get client count or lenght of message . Is this some function like message.text.(lenght,count)
Preslav Semov Hadzhitsanev
@preslavsh
@zlatkos94 message.text should be just string that you can count as in basic python
Denis
@cellmon
@zlatkos94 Of course!
You can create any functions for your tasks.
Python is unlimited :)
But don't forget that simple is better than complex...
zlatkos94
@zlatkos94
Thanks, it working with basic python . Now does someone have idea how to send to user message ("type your name") and when user sent it , send him ("type your surname") . In this case there is not action on button and when i set some code for validation , validation use it for message from past
Denis
@cellmon
@zlatkos94
Of course! Write responses to the database and keep your message thread with tracking_data
VitalijKo
@VitalijKo

Всем привет. Я создал бота viber с помощью python. В итоге, при взаимодействии с ним, возникает такая ошибка:

Exception: failed with status: 1, message: Result[HttpRequest[POST / HTTP/1.1]@28e4463e > HttpResponse[null 0 null]@2ea54b1d] java.util.concurrent.TimeoutException: Total timeout elapsed

Что же мне делать?

Hello. I created a viber bot using python. As a result, when interacting with him, the following error occurs:

Exception: failed with status: 1, message: Result[HttpRequest[POST / HTTP/1.1]@28e4463e > HttpResponse[null 0 null]@2ea54b1d] java.util.concurrent.TimeoutException: Total timeout elapsed

What should i do?

Denis
@cellmon
@VitalijKo Наверно на Flask делал! По примерам в github ?
zlatkos94
@zlatkos94
I was wondering how can I await for user to respond to my message using the viber api
Sergey Novozhilov
@OtecAbsolut
Весь трейсбэк скинь посмотреть, не понятно же ничего..
@VitalijKo
Albert
@pykam
Есть возможность посадить бота в сообщество в качестве админа?
Denis
@cellmon
@pykam Нет. У Viber пока никак. Непублично возможно. Ждём
Albert
@pykam
@cellmon Спасибо. Значит все таки стоит подождать?
Denis
@cellmon
@pykam я надеюсь! Пока телеграм на перерыве в РФ. Я надеюсь что фиолетовый мессенджер возьмет отличный реванш!