title: What is the effect of setRedirectUri?
body: <p>I try to use google API php library PHP for oauth, and the official code as the follows:</p>
  
  <pre><code>$client = new Google_Client();
  $client-&gt;setAuthConfig('client_secrets.json');
  $client-&gt;setAccessType("offline");        // offline access
  $client-&gt;setIncludeGrantedScopes(true);   // incremental auth
  $client-&gt;addScope(Google_Service_Drive::DRIVE_METADATA_READONLY);
  $client-&gt;setRedirectUri('http://' . $_SERVER['HTTP_HOST'] .'/oauth2callback.php');
  </code></pre>
  
  <p>But I found the downloaded 'client_secrets.json' already contains redirectURI, and I found the oauth in the app can work without calling $client->setRedirectUri :</p>
  
  <pre><code>$client = new Google_Client();
  $client-&gt;setAuthConfig('client_secrets.json');
  $client-&gt;setAccessType("offline");        // offline access
  $client-&gt;setIncludeGrantedScopes(true);   // incremental auth
  $client-&gt;addScope(Google_Service_Drive::DRIVE_METADATA_READONLY);
  </code></pre>
  
  <p>so my question is, what is the usage to call </p>
  
  <pre><code>$client-&gt;setRedirectUri
  </code></pre>
  
  <p>?</p>