Hi @pgr , Team
We are trying to generate access token ,
We have done all the above steps mentioned at the above url
Later configured authentication according to below url
now we are trying to get the access token using below code
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => “https://{crm_url}/Api/access_token”,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => “”,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => “POST”,
CURLOPT_POSTFIELDS => “grant_type=client_credentials&client_id=dXXXXc&client_secret=8XXXXd”,
CURLOPT_HTTPHEADER => array(
“Content-Type: application/x-www-form-urlencoded”
),
));
$response = curl_exec($curl);
print_r($response);
curl_close($curl);
The response is blank …
Just an note … our crm is on vpn & can be only accessed over vpn … would that be an issue to give a response?? … however we are trying to run the above script on vpn itself.
or am I doing anything wrong? also checked out php & suitecrm logs , cant find anything there .
Please guide us we are on 7.11.10 version of suitecrm & php version 7.4.18
Thank you in advance.
Kindly ,
Sravani