Demo entry 6628328

laravel

   

Submitted by anonymous on Jul 03, 2017 at 20:02
Language: PHP. Code size: 431 Bytes.

$this->client = new \GuzzleHttp\Client([
 'base_url' => 'https://app.klyant.com/api/'
 ]);
$this->response = $this->client->post('access_token', [
 'body' => [
 'grant_type' => 'password',
 'client_id' => 'your client id',
'client_secret' => 'your client secret',
 'username' => 'Klyant login email',
 'password' => 'Klyant password'
 ]
 ]);
 $token = $this->response->json();
 $this->token = $token['access_token'];

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).