Zoho API-V2 Добавить Attactmetn URL - PullRequest
0 голосов
/ 31 октября 2018

Я пытаюсь добавить URL-адрес вложения в crm. Я передаю эту документацию . Но я получил ошибку!

Это мой код:

$zoho_url = "https://www.zohoapis.com/crm/v2/$module/$id/Attachments";
$post['attachmentUrl'] = $url;
$ch=curl_init();
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_URL,$zoho_url);
curl_setopt($ch,CURLOPT_POSTFIELDS,$post);
$headers = array(); 
$headers[] = "Authorization: ".$authtoken; 
$headers[] = "Content-Type: multipart/form-data"; 
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); 

$response = curl_exec($ch); 
$err = curl_errno($ch);

curl_close ($ch);
if ($err) {
  $result = $err;
} else {
  $result = $response;
}

print_r($result);

Это ответ:

{"code":"INVALID_REQUEST","details":{},"message":"unable to process your request. please verify whether you have entered proper method name, parameter and parameter values.","status":"error"}
...