Where do I have to place the code returned by Google oAuth after I grant access to an installed application, using PHP? -
this has been nightmare right past few days. first struggling redirect_uri_mismatch errors, or bad requests, thought nailed it, i'm getting message google after clicking "allow" button in consent screen :
please copy code, switch application , paste there
where need paste code? i'm using php in web server, went "other" application type when creating credentials, because read preferred if didn't want users keep getting auth link.
i can't seem find concrete example of how this, got working far grabbing bits here , there, 1 can't figure out.
https://gist.github.com/andruxnet/0f7fe237730c13846a690da12935a708
i'm using file client_secret.json downloaded google's oauth credentials screen, looks 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 else need or put code returned google after consent screen?
thanks
i see disinformation, go , check link:
https://developers.google.com/api-client-library/php/auth/web-app#example
there have many examples of requesting, anyway code receiving google auth code allows authenticate client (the google_client->authenticate(authcode)
created in php app more exact), after can start using services accesstoken or refreshtokens depending on type of connection requested generete perms.
i hope comment bit nightmare of developing google services :)
Comments
Post a Comment