I need to develop an application with the Calendly api, but instead of redirecting me in the auth process, it constantly refreshes the Connect to Calendly page. My code is as follows
include "./calendly.php";
include "./config.php";
$redirectUrl = "http://localhost/calendly";
header("Location: https://auth.calendly.com/oauth/authorize?client_id=".$clientID ."&response_type=code&redirect_uri=".$redirectUrl."");
if(isset($_GET["code"])){
$calendly = new calendly($clientSecretKey,$clientID,$redirectUrl);
// $code = $calendly->getAuthCode();
var_dump($code);
}