Using Rest API 8 How to get access_token value in response

Hey,
pls have a look in \Api\docs\postman\ - there are postman examples that you can reuse to test against your environment.

From there, you can export the (hopefully working) request as php code as well, i.e. something like:

<?php
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "<your system 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=<client-id>&client_secret=<client-secret>",
  CURLOPT_HTTPHEADER => array(
    "Content-Type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;