0

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?

Kunok
  • 8,089
  • 8
  • 48
  • 89
  • Is there any reason why you use php to operate a node script? It would be easier to use [google-api-php-client](https://github.com/google/google-api-php-client) for smooth and easy flow of codes. – Mr.Rebot Aug 25 '16 at 07:02
  • @Mr.Rebot Yeah, I am writing all Google API code in Node.js. Our old apps are written in PHP, but we are about to use Node.js as much as possible in the present and future. – Kunok Aug 28 '16 at 14:06

0 Answers0