use GuzzleHttp\Client;
$options = [ 'name' => 'my name', 'client_id' => 'my client_id', 'client_secret' => 'my client_secret', ]; $client = new Client(); $res = $client->request('POST', 'https://oauth.server.local/token', ['form_params' => $options]); echo $res->getBody();