Skip to content

Instantly share code, notes, and snippets.

@NimzyMaina
Created May 9, 2019 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NimzyMaina/1cc527997ffdf576314f8a7aa133bcb7 to your computer and use it in GitHub Desktop.
Save NimzyMaina/1cc527997ffdf576314f8a7aa133bcb7 to your computer and use it in GitHub Desktop.
<?php
$http = new GuzzleHttp\Client;
$response = $http->post(url('oauth/token'), [
'form_params' => [
'grant_type' => 'password',
'client_id' => 2,
'client_secret' => 'SECRET_HERE',
'username' => 'user@example.com',
'password' => 'supersecret',
'scope' => ''
]
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment