Posts: 54
Joined: Thu Mar 22, 2018 2:04 pm

Google Sheets API

Mon Mar 25, 2019 1:43 pm

I'm having trouble setting up the API for google sheets. I think the setup would be straightforward for a user that was sending data from their main computer, to be viewed on their main computer. The setup instructions for python on their website are:

1. Create a google login.
2. Enable the API by clicking a button on their dev webpage
3. The credentials are downloaded in a json file, move it to the working directory
4. Run the python script that they supply in the working directory
5. The python script provides a URL to paste into a browser that opens request to synch with the python script.
6. viola, it should work ... art/python

Problem is that I am trying to do this on a different machine. I'm running the python script on a linux machine that I'm SSH'd into. When I run the python script I get the URL, then I paste it into a browser on the Windows machine that I'm sitting at, Google tries to synch with the python script that is running on the linux machine and I get a "local host refused to connect" error in my browser.

I also tried going to that address on the Linux machine with Curl and the output was pretty cryptic:

Code: Select all

[email protected]:/home/shadow_saunter# curl'm not sure how much of this URL is 
secret, but its a long hashed out address)&access_type=offline
[1] 3357
[2] 3358
[3] 3359
[4] 3360
[5] 3361
[email protected]:/var/www/DataBase# <!DOCTYPE html><html ....(a bunch of html follows, this line launches 
automatically  after the previous with no input from me.  I don't see any error message in it)
What can I do to get the API to synch with the correct machine?

Return to “Networking and servers”