getImMessengerUrl
\Bitrix\ImConnector\Connector::getImMessengerUrl($lineId, $connectorId, $additional)
Method gets link to Telegram bot with/without start parameter.
Returns structure with two links
array{web: string, mob: string}
- for browser: https://t.me/bot_name?start=xxxx
- for mobile device: tg://resolve?domain=bot_name&start=xxxx
Parameters
Parameter | Format | Description | Available from version |
---|---|---|---|
$lineId | int | Channel ID. | |
$connectorId | string | Channel ID. | |
$additional | array|string|null | Start parameter is a string or set of parameters in the array. |
Example
\Bitrix\ImConnector\Connector::getImMessengerUrl(1, 'telegrambot', 'xxxx');
© «Bitrix24», 2001-2024