问题
Whenever OAuth2 Google API script is called for the first time it requires authentication.
node googleAPIscript.js
It simply provides link and asks for input. The given link contains generated string that should be pasted into the input.
Now that is an issue when that script is first called from other script written in different language.
I have a PHP web script that executes Google API Node script such as:
echo exec('node googleAPIscript.js');
And the output string looks like this:
Enter the code from that page here:
This is simply a string inside a browser and I can't do any input to validate script with G-API.
Are there any solutions to this or alternatives?
来源:https://stackoverflow.com/questions/39118733/when-oauth2-google-api-script-is-called-from-other-script-it-is-not-possible-to