+2 votes

hello i started working on a google api interface for sheets firebase and such.
you can read with the from the google api's fine only using the api key.
the trickey part is writing to the api because you need the api Oauth2 token and that is a handfull to get the only thing i need to do now is handle the redirect URI :

https://accounts.google.com/o/oauth2/v2/auth?client_id=981207562170-qncje5otb4d5r5l2qrftdtde1kobkmiu.apps.googleusercontent.com&response_type=code&redirect_uri=https://127.0.0.1&scope=https://www.googleapis.com/auth/drive.file

it looks like this. when you would use the url in the httprequest node you get a lot of html code back. wich is the code for user consent webpage. if you do it with shell open you get the correct page in your browser.

after having given consent you are redirected to youre redirect url:
https://127.0.0.1/?code=4%2F0AY0e-g59AaaU5pUXLFBdlU7Je5ew_*************************_hjkcbpLPTv0DhFw&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive.file

now i need to get that URL from my browser in godot as a variable.
or receive it via anny of the gdNative server modules?

thanks for any responses.

Godot version 3.2.3
in Engine by (20 points)
edited by

Any luck on this? I have been stuck on the same part for a while and have just resorted to having Godot run a python script that gets the token and saves it so a JSON, but I would love to be able to do this entirely in Godot.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.