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 :
Please copy this code, switch to your application and paste it there
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.
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.
https://gist.github.com/andruxnet/0f7fe237730c13846a690da12935a708
I'm using a file client_secret.json that I downloaded from Google's oAuth credentials screen, it looks like this:
{"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"]}}
Anyone knows what else I need to do or where to put that code returned from Google after the consent screen?
Thanks