Hello starlord, here is an example code so you can communicate with the API. I used this calls to create a offline market system. It is very easy to understand, you will not have problems. Happy coding!
//GET TOKEN
$url = 'http://localhost:5400/api/oauth/token';
$password = '12345';
$password = hash( 'sha256', $password );
$data = array(
'grant_type' => 'password',
'username' => 'test',
'password' => $password
);
$data = json_encode($data);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);
$result = json_decode($result, JSON_OBJECT_AS_ARRAY);
//GET INVENTORY
$player = 'dummy';
$url = 'http://localhost:5400/api/v1/players/'.$player.'/items/inventory';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('authorization: bearer '.$result['access_token'].''));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$inventory = curl_exec($ch);
curl_close($ch);
$inventory = json_decode($inventory, JSON_OBJECT_AS_ARRAY);