title: Where do I have to place the code returned by Google oAuth after I grant access to an installed application, using PHP?
body: <p>This has been a nightmare to get right for the past few days. First I was struggling with redirect_uri_mismatch errors, or bad requests, but now that I thought I nailed it, I'm getting this message from Google after clicking the "Allow" button in the consent screen :</p>
  
  <p><strong>Please copy this code, switch to your application and paste it there</strong></p>
  
  <p>Where exactly do I need to paste this code? I'm using PHP in a web server, I went to the "Other" application type when creating the credentials, because I read that this was preferred if I didn't want my users to keep getting that auth link.</p>
  
  <p>I can't seem to find a concrete example of how to do this, I got it working this far by grabbing bits from here and there, but this one I just can't figure it out.</p>
  
  <p><a href="https://gist.github.com/andruxnet/0f7fe237730c13846a690da12935a708" rel="nofollow">https://gist.github.com/andruxnet/0f7fe237730c13846a690da12935a708</a></p>
  
  <p>I'm using a file client_secret.json that I downloaded from Google's oAuth credentials screen, it looks like this:</p>
  
  <pre><code>{"installed":{"client_id":"xxxxxxxxxxxxxxx.apps.googleusercontent.com","project_id":"my-project-id","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://accounts.google.com/o/oauth2/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"xxxxxxxxxxx","redirect_uris":["urn:ietf:wg:oauth:2.0:oob","http://localhost"]}}
  </code></pre>
  
  <p>Anyone knows what else I need to do or where to put that code returned from Google after the consent screen?</p>
  
  <p>Thanks</p>