S
S
shumik_ua2020-10-24 23:38:16
Bots
shumik_ua, 2020-10-24 23:38:16

Viber bot error when sending share-phone button, is it ok?

I read in the documentation and on the forums that the button for getting a contact works only in the mobile version, in the desktop it returns the text, and you need to set it in the ActionBody, so I do it:
[
'Columns' => 6,
'Rows' => 1,
'Text ' => "Send phone,
'ActionType' => 'share-phone',
'ActionBody' => "Action body text"
]
But when I send it, I don't even get the text - just an error:
{"status":3,"status_message ":"keyboard is not valid. [instance value (\"share-phone\") not found in enum (possible values: [\"reply\",\"open-url\",\"\"])]","chat_hostname"
It's just strange, I tried to send a request from the phone, deleted the bot and started a chat from the phone - one result. Please explain, maybe I'm doing something wrong

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
shumik_ua, 2020-10-26
@shumik_ua

Found information in the API itself. For specific work, you need to prohibit users with old viber versions from viewing messages with the parameter 'min_api_version' = 7; for example. When I specified the parameter - it worked

D
Denis BotViber, 2020-10-26
@cellmon

min_api_version' = 3
Better this way! 7 is absolutely cruel!!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question