V
V
Vyacheslav Rakhinsky2018-12-18 17:58:29
Python
Vyacheslav Rakhinsky, 2018-12-18 17:58:29

How to request phone numbers in viber api?

In viber it is possible to make a button with sending a contact

{
  ...    
  "ActionType": "share-phone",
  "ActionBody": "reply",
  "Text": "Зарегистрироваться"
},

The documentation says that if "ActionType": "share-phone" then "ActionBody" should
be
none on the mobile client,
but on the desktop it doesn’t work, text arrives: reply
If someone has already done this functionality, throw off the json that you send

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vyacheslav Rakhinsky, 2019-09-17
@rakhinskiy

For those who periodically get here on the same issue
1. Viber support replied that this functionality is not available in the desktop client
2. For mobile clients, you need to specify min_api_version 3 or higher to make it work

S
Sergey, 2020-08-24
@Yestestvenno

differs from the regular menu by 3 lines
+1 in the menu $data['min_api_version'] = 3;
and replace two in a specific button
$getphone['ActionType']="share-phone";
$getphone['ActionBody']="phone";

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question