title: Get user data using access token in laravel passport client app
body: <p>I have successfully created <strong>server.app</strong> and <strong>client.app</strong> using <strong>Laravel Passport documentation</strong>. Everything works as expected.</p>
  
  <p><strong>client.app Route:</strong></p>
  
  <pre><code>Route::get('callback', function (Request $request) {
     $http = new GuzzleHttp\Client;
     $response = $http-&gt;post('http://server.app/oauth/token', [
      'form_params' =&gt; [
          'grant_type' =&gt; 'authorization_code',
          'client_id' =&gt; 3,
          'client_secret' =&gt; 'secret',
          'redirect_uri' =&gt; 'http://client.app/callback',
          'code' =&gt; $request-&gt;code
      ]
     ]);
     return json_decode((string) $response-&gt;getBody(), true)['access_token'];
  });
  </code></pre>
  
  <p>By default, this route returns <strong>access_token</strong>, with which i can do whatever i want.</p>
  
  <p><strong>Request:</strong></p>
  
  <pre><code>http://server.app/oauth/authorize?client_id=3&amp;redirect_uri=http%3A%2F%2Fclient.app%2Fcallback&amp;response_type=code&amp;scope=
  </code></pre>
  
  <p><strong>Returns:</strong></p>
  
  <pre><code>http://client.app/callback?code=access_token
  </code></pre>
  
  <p><strong>Question:</strong></p>
  
  <p>How to make correct request to <strong>server.app</strong> with given access_token in <strong>client.app</strong> to get for example <strong>user(s) email(s)</strong>.</p>
  
  <p>Should i use: <code>http://server.app/api/user</code> request to get data? If yes, how i can do that? If possible, please write a code.</p>
  
  <p>Thanks for any answers.</p>