Reputation: 1
I try to send a welcome message to a new unsigned user, but it doesn't work. Please, help how solve this problem? This code doesn't work:
elseif($input['event'] == 'conversation_started') {
// "tracking_data" = "tracking data",
$data['tracking_data'] = $tracking_data;
$message['type'] = "text";
$message['text'] = 'Text to new user';
$message['keyboard'] = [
"Type" => "keyboard",
"DefaultHeight" => true,
"Buttons" => [[
"ActionType" => "reply",
"ActionBody" => "main_menu",
"Text" => "Main menu",
"TextSize" => "regular"
]]
];
}
Upvotes: 0
Views: 430
Reputation: 436
As viber documentation stated, user must be subscribed in order for bot to send any kind of message.
An approach to your problem is:
Please check how Viber Documentation API works!
Upvotes: 0