title: How do I get a refresh token in Laravel Passport?
body: <p>I'm using Laravel 6.7 and attempting to use <strong>Passport</strong> for user authentication.</p>
  
  <p>I'm able to create an access token for the user when they register. Here is the code:</p>
  
  <pre class="lang-php prettyprint-override"><code>$user = User::create($input);
  $user-&gt;createToken('auth-token');
  </code></pre>
  
  <p>This access token has an expiration of 15 minutes as I defined in my <strong>AuthServiceProvider.php</strong> file <code>boot()</code> function like so:</p>
  
  <pre><code>Passport::personalAccessTokensExpireIn(Carbon::now()-&gt;addMinutes(15));
  </code></pre>
  
  <p>I want to refresh it using a refresh token but can't seem to understand how.</p>
  
  <p>I've looked everywhere (including the Laravel website) and they're all telling me to do this:</p>
  
  <pre><code>$http = new GuzzleHttp\Client;
  
  $response = $http-&gt;post('http://your-app.com/oauth/token', [
      'form_params' =&gt; [
          'grant_type' =&gt; 'refresh_token',
          'refresh_token' =&gt; 'the-refresh-token',
          'client_id' =&gt; 'client-id',
          'client_secret' =&gt; 'client-secret',
          'scope' =&gt; '',
      ],
  ]);
  </code></pre>
  
  <p>Without any clear explanation as to what the values <code>'the-refresh-token'</code>, <code>'client-id'</code> and <code>'client-secret'</code> are meant to be.</p>
  
  <p>One <a href="https://stackoverflow.com/questions/53774731/laravel-passport-refresh-token">answer</a> on stack overflow said the following:</p>
  
  <blockquote>
    <p>you must send old refresh-token (<code>'refresh_token' =&gt; 'the-refresh-token'</code>) and this code produces a new token and refresh-refresh.</p>
  </blockquote>
  
  <p>But I don't have a refresh token, I'm trying to create one. Do I just create a random string?</p>