We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
Is there any way to send broadcast message for all subscribers?
For example i want to trigger bot.php externaly to send all subscribers some message.
Thanks.
The text was updated successfully, but these errors were encountered:
Yes, you can. Use this snippet:
$client = new \Viber\Client([ 'token' => 'YOU_TOKEN', ]); $botSender = new \Viber\Api\Sender([ 'name' => 'Whois bot', 'avatar' => 'https://developers.viber.com/img/favicon.ico', ]); // TODO: fetch receiver ids from you database $receiverIds = []; foreach ($receiverIds as $id) { $client->sendMessage( (new \Viber\Api\Message\Text()) ->setSender($botSender) ->setReceiver($receiverId) ->setText('text message here') ); }
Sorry, something went wrong.
Yes, got you. But is there any way to make a viber call instead of message? Tried to google but nothing found.
As far as I know, calls via PA-api not supported.
Bogdaan
No branches or pull requests
Hi,
Is there any way to send broadcast message for all subscribers?
For example i want to trigger bot.php externaly to send all subscribers some message.
Thanks.
The text was updated successfully, but these errors were encountered: