When OAuth2 Google API script is called from other script, it is not possible to validate it

試著忘記壹切 提交于 2019-12-25 09:06:04

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!