SuitCRM authentication and configuration

Hi , I am trying to access authentication using client_credentials and password. I have created local instance. here is my code

$ch = curl_init();
$header = array(
'Content-type: application/vnd.api+json',
'Accept: application/vnd.api+json',
);
$postStr = json_encode(array(
'grant_type' => 'password',
'client_id' => 'dcb8079a-0873-ce02-28a1-5ba784478fd0',
'client_secret' => 'admin.787',
'scope' => 'standard:create standard:read standard:update standard:delete standard:delete standard:relationship:create standard:relationship:read standard:relationship:update standard:relationship:delete',
'username' => 'admin',
'password' => 'admin'
));

$url = 'http://localhost/mohsin/suitcrm-m/api/oauth/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);
echo "the response(output):\n";
print($output);
$txt = "\ncompleted\n";
echo $txt;
#for review
//print($postStr);
?>

But i am getting response
the response(output):

{"errors":[{"code":0,"title":"Generate JSON API Response exception detected: InvalidArgumentException: Invalid HTTP status code (0)","status":400},{"id":"1","links":{"about":null},"status":"200","code":0,"title":"JSON API Error","detail":"JSON API Error occured.","source":{"pointer":null,"parameter":null},"meta":{"about":"Exception","class":"RuntimeException","code":0}}],"meta":{"suiteapi":{"major":8,"minor":0,"patch":0,"stability":"ALPHA"}},"jsonapi":{"version":"1.0"}} completed

I have no idea whats going on. Please help me out.