@extends('layouts.app') @section('content')
$guzzle = new GuzzleHttp\Client;
$response = $guzzle->post('/oauth/token', [
'form_params' => [
'grant_type' => 'client_credentials',
'client_id' => 'client-id',
'client_secret' => 'client-secret',
'scope' => 'your-scope',
],
]);
return json_decode((string) $response->getBody(), true)['access_token'];
$response = $client->request('GET', '/api/user', [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer '.$accessToken,
],
]);
Description | Méthode | Route | Paramètres |
---|---|---|---|
{{ $endpoint['description'] }} | {{ $endpoint['method'] }} | {{ $endpoint['endpoint'] }} |
@foreach($endpoint['params'] as $param)
{{ $param[0] }} {{ $param[1] }} ({{ $param[2] === 'R' ? 'Requis' : 'Optionnel' }})
@endforeach
|