Make a quick vote 🗳 ️How do you refer to SuiteCRM extensions: add-ons or plug-ins? Click here to have your say 👈

SuiteCRM api v8 not giving any response

I want to upgrade my SuiteCRM to latest generation of SuiteCRM versions. Since I am using REST API4.1 for my existing SuiteCRM and came to know that I have to use API v8 for latest generation of SuiteCRM versions, I installed SuiteCRM 7.11.3 with dummy data on our demo server running on https with PHP version 7.1.17.

After this, I generated “client_id” and “client_secret” for “Client Credentials” Grant type by navigating at “Admin” - “OAuth2 Clients and Tokens” - “New Client Credentials Client” on this.

Now I am checking the CRM API for Authentication with Client Credentials and trying to obtain a session using below code but neither getting any array or session nor any error for this.

$ch = curl_init();
$header = array(
‘Content-type: application/vnd.api+json’,
‘Accept: application/vnd.api+json’,
$postStr = json_encode(array(
‘grant_type’ => ‘client_credentials’,
‘client_id’ => ‘xxxxxxxxxx’,
‘client_secret’ => ‘xxxxxxxxxx’
$url = ‘https://url/Api/access_token’;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, ‘POST’);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postStr);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
$output = curl_exec($ch);

$tab = json_decode($output);
echo “

”; print_r($tab); echo “
” ;

I have tried by adding “‘scope’ => ‘’” in $postStr as suggested in one of posts but did not return anything.

Can anyone please guide regarding this?

Thanks in advance.