Documentation

Providers

Attention! Before using this API, please make sure that provider scheduled to send SMS is connected to a Bitrix24 instance.

Providers

// List of available providers
\Bitrix\MessageService\Sender\SmsManager::getSenders()

// Default provider \Bitrix\MessageService\Sender\SmsManager::getDefaultSender()

// First available provider \Bitrix\MessageService\Sender\SmsManager::getUsableSender()

// Provider by ID $senderId = \Bitrix\MessageService\Sender\Sms\Ednaru::ID; $sender = \Bitrix\MessageService\Sender\SmsManager::getSenderById($senderId);


Registering your own provider

$eventManager = \Bitrix\Main\EventManager::getInstance(); 
$eventManager->registerEventHandler('messageservice', 'onGetSmsSenders', 'messageservice', 'Bitrix\MessageService\Sender\Sms\Dummy', 'onGetSmsSenders');


© «Bitrix24», 2001-2024