The following code in a server-side PHP file is not presenting 'consent' page.
$data = array('scope' => "ZohoBooks.fullaccess.all", 'client_id' => $CLIENTID, 'client_secret' => $CLIENT_SECRET, 'state' => "testing", 'response_type' => "code", 'redirect_uri' => "
https://www.zoho.com/in/books/", 'access_type' => "offline");
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => http_build_query($data),
CURLOPT_HTTPHEADER => array(
"content-type: application/x-www-form-urlencoded;charset=UTF-8"
),
));
$response = curl_exec($curl);
$info = curl_getinfo($curl);
$err = curl_error($curl);
Is there an explicit callback to be coded to present "consent" page to user? If so, can someone guide how to find redirect_url as $response is returning blank for me.