How to get google api authorization code without redirect

Viewed 730

I am using Oauth to download blog posts from Blogger. The first step of the process is sending a request to

https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=https%3A%2F%2Fdevelopers.google.com%2Foauthplayground&prompt=consent&response_type=code&client_id=407408718192.apps.googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fblogger.readonly&access_type=offline

and then google redirects me back to my script with an access code in the parameter

/oauthplayground/?code=4/YVFm8eTYX5ZjMmDZn5g3joSm2s7NLg27kPU2fZPwXtE

Once the user granted access to through his google account, is there an alternative to get this code without the redirect? For example a request that returns a JSON object?

0 Answers
Related