Created
November 28, 2016 13:01
-
-
Save JeroenJochems/bb8348c72e2da42e6e1e997490243dae to your computer and use it in GitHub Desktop.
Password grant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$http = new GuzzleHttp\Client; | |
$response = $http->post('https://l1nda:t3mp3r@dev1.temper.works/oauth/token', [ | |
'form_params' => [ | |
'grant_type' => 'password', | |
'client_id' => '3', | |
'client_secret' => 'QVPm9nGWGQJcgofqkpIvpEnOucWso0E1io4RhQgv', | |
'username' => 'client@example.net', | |
'password' => 'secret', | |
'scope' => '', | |
], | |
]); | |
return json_decode((string) $response->getBody(), true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment