Telegram - ?

CRM24

24 Telegram

CRM

. . , Telegram CRM 24.

Telegram. .php Linux . , :)


, . , , . , Telegram - 5 . , .


? 331754110:AAHkMNalOz5I_Schh2kvj7ONhRcE8HuKV-c ID () . , ( //):

<?php
$token = "_"; //    ;
$chat_id = "ID_"; //    
$lead_name=$_GET['name']; //  GET  , ,    ;
$lead_respons=$_GET['respons'];
$lead_source=$_GET['source'];
$lead_link=$_GET['link'];
$lead_link1 = "https://__.bitrix24.ru/crm/lead/show/$lead_link/"; //      ,          Telegram;
#  
$hello = "<b>, !</b>"; //    (),      Telegram  API;
$hello_1 = "";
$message = " CRM 24    -  ";
$repons = " - ";
$src= " - ";
$link = " - ";
$arr = array( //   ;
$hello => $hello_1,
$message => $lead_name,
$repons => $lead_respons,
$src => $lead_source,
$link => $lead_link1,
);
foreach($arr as $key => $value) {
if ($key == " - ") { $txt .= "".$key." ".$value."%0A";} else {
$txt .= "".$key." ".$value."%0A";
}};
fopen("https://api.telegram.org/bot{$token}/sendMessage?chat_id={$chat_id}&parse_mode=html&text={$txt}","r"); //     API ;
?>

, .php

, bitrixtelegram.php WEB - ( ). web Apache CentOS /var/www/html/.

! web (24 ). https, , (, v2I7TD9w3zo9QR7vg6ApNwDVvJOj9XbO61OJKdIyxI6d0. , /var/www/html/v2I7TD9w3zo9QR7vg6ApNwDVvJOj9XbO61OJKdIyxI6d0). , IP ( web / L3).

, , Linux, ( ):

chmod 755 /var/www/html/v2I7TD9w3zo9QR7vg6ApNwDVvJOj9XbO61OJKdIyxI6d0/bitrixtelegram.php
dos2unix /var/www/html/v2I7TD9w3zo9QR7vg6ApNwDVvJOj9XbO61OJKdIyxI6d0/bitrixtelegram.php

24

, (Webhook). , 24. , GET - .

. CRM - :

 24  Telegram   -

. , Webhook:

 Webhook     24

, :

https://telegram.merionet.ru/ v2I7TD9w3zo9QR7vg6ApNwDVvJOj9XbO61OJKdIyxI6d0/ bitrixtelegram.php?name={=Document:TITLE}&respons={=Document:ASSIGNED_BY_PRINTABLE}&source={=Document:SOURCE_ID}&link={=Document:ID}

:

  1. https://telegram.merionet.ru - , ;
  2. v2I7TD9w3zo9QR7vg6ApNwDVvJOj9XbO61OJKdIyxI6d0 - web , ;
  3. bitrixtelegram.php - ;
  4. ?name={=Document:TITLE}&respons={=Document:ASSIGNED_BY_PRINTABLE}&source={=Document:SOURCE_ID}&link={=Document:ID} - , , , , ID - ;
 Webhook  24

:) CRM:

Telegram:

     24  Telegram

?