gpt4 book ai didi

php - 错误 4600 Zoho CRM 使用 cURL 插入记录

转载 作者:搜寻专家 更新时间:2023-10-31 21:51:48 25 4
gpt4 key购买 nike

出现错误 - 4600 无法处理您的请求。请验证您是否输入了正确的方法名称、参数和参数值。

$auth="authkey";
$email = $_POST['lowner'];
$firstName = $_POST['fname'];
$lastName = $_POST['lname'];
$email = $_POST['email'];
$phone = $_POST['phone'];

$url = 'https://crm.zoho.com/crm/private/xml/Leads/insertRecords?';
$post = 'newFormat=1&authtoken='.$auth.'&scope=crmapi&xmlData=<Leads>
<row no="1">
<FL val="Lead Owner">'.$email.'</FL>
<FL val="First Name">'.$firstName.'</FL>
<FL val="Last Name">'.$lastName.'</FL>
<FL val="Email">'.$email.'</FL>
<FL val="Phone">'.$phone.'</FL>
<FL val="Description">Insert ZOHO Lead</FL>
</row>
</Leads>';
//================= start curl ===================
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS,$post);
$result = curl_exec($ch);
curl_close($ch);
//================= end curl ===================
echo '<pre>';
print_r($result);
exit;

最佳答案

它应该工作正常,但您正在用其他电子邮件覆盖包含潜在客户变量的电子邮件。

检查下面的代码:

$auth="authkey";
$leadowner = $_POST['lowner'];
$firstName = $_POST['fname'];
$lastName = $_POST['lname'];
$email = $_POST['email'];
$phone = $_POST['phone'];

$url = 'https://crm.zoho.com/crm/private/xml/Leads/insertRecords?';
$post = 'newFormat=1&authtoken='.$auth.'&scope=crmapi&xmlData=<Leads>
<row no="1">
<FL val="Lead Owner">'.$leadowner.'</FL>
<FL val="First Name">'.$firstName.'</FL>
<FL val="Last Name">'.$lastName.'</FL>
<FL val="Email">'.$email.'</FL>
<FL val="Phone">'.$phone.'</FL>
<FL val="Description">Insert ZOHO Lead</FL>
</row>
</Leads>';
//================= start curl ===================
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS,$post);
$result = curl_exec($ch);
curl_close($ch);
//================= end curl ===================
echo '<pre>';
print_r($result);
exit;

关于php - 错误 4600 Zoho CRM 使用 cURL 插入记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40522198/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com