Bitrix24 CRM具有webhook功能,可以为CRM添加潜在客户(客户).所有文档都是用php编写的,但我想使用ASP.NET.以下是他们在php上的表现:
$queryUrl = 'https://restapi.bitrix24.ru/rest/1/31uhq2q855fk1foj/crm.lead.add.json';
$queryData = http_build_query(array(
'fields' => array(
"TITLE" => "NEW LEAD"
),
'params' => array(
"REGISTER_SONET_EVENT" => "Y"
)
));
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_POST => 1,
CURLOPT_HEADER => 0,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $queryUrl,
CURLOPT_POSTFIELDS => $queryData
));
$result = curl_exec($curl);
curl_close($curl);
$result = json_decode($result, 1);
Run Code Online (Sandbox Code Playgroud)
我正在尝试使用ASP.NET做同样的事情,但得到错误400作为响应.我几乎可以肯定问题出在请求参数中const string data = @"[{""fields"":{""title"":""Test""}}]";.我已经尝试了很多组合,但没有任何效果.
const string url = @ "https://companyname.bitrix24.ru/rest/14/31uhq2q855fk1foj/crm.lead.add.json";
const string data = @"[{""fields"":{""title"":""Test""}}]";
HttpClient client = …Run Code Online (Sandbox Code Playgroud) 我正在一个 bitrix 网站上工作。创建了一个链接到排序为 100 的信息块的表单。
<? echo print_input($arParams, $arResult, 100) ;?>
Run Code Online (Sandbox Code Playgroud)
我想使用当前日志用户的默认用户数据,例如姓名、电子邮件等。我该如何处理呢?
任何帮助将不胜感激。
我正在使用以下设置:
s1.conf
# Default website
server {
listen 80;
server_name test.com www.test.com;
return 301 https://test.com$request_uri; # enforce https
server_name_in_redirect off;
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log warn;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host:80;
proxy_set_header< X-Forwarded-Host $http_host
set $proxyserver "http://127.0.0.1:8888";
set $docroot "/home/bitrix/www";
index index.php;
root /home/bitrix/www;
# Redirect to ssl if need
if (-f /home/bitrix/www/.htsecure) { rewrite ^(.*)$ https://$host$1 permanent; }
# Include parameters common to all websites
include bx/conf/bitrix.conf;
# Include server monitoring locations
include bx/server_monitor.conf;
} …Run Code Online (Sandbox Code Playgroud)