У меня есть $ code и другие значения переменных, но я получаю сообщение об ошибке "Произошла ошибка сервера. Похоже, вы ввели неверный адрес или URL, на который вы нажали, недействителен."
![enter image description here](https://i.stack.imgur.com/xCMWw.png)
$adminUrl='https://accounts.zoho.com/oauth/v2/token';
$data = array("code" => $code,
"redirect_uri" => $redirect_url,
"client_id"=>$client_id,
"client_secret" =>$client_secret,
"grant_type"=> "authorization_code",
"scope" => "ZohoCRM.modules.ALL");
$data_string = json_encode($data,JSON_UNESCAPED_SLASHES);
$headers = array(
'Content-Type: application/json',
'Content-Length: ' . strlen($data_string)
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $adminUrl);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
$token = curl_exec($ch);