mbrenig / SheetSync

A python library to create, update and delete rows of data in a google spreadsheet.
http://sheetsync.readthedocs.org
MIT License
48 stars 18 forks source link

sheetsync approach to OAuth2 is different to PyDrive - can we do better? #12

Open roganjoshp opened 8 years ago

roganjoshp commented 8 years ago

I'll start by saying that I have only recently started looking into Google APIs and haven't yet had SheetSync working so not sure if this is new. However, I can currently only create a file on Drive and then get "401: Token Invalid - AuthSub token has wrong scope" when trying to write to the file.

EDIT: After hours of frustration I realise that this is my own fault. Sheets is packaged with SheetSync. I misinterpreted this suggestion at the top of the tutorial: "Before using sheetsync in production you should learn about Client IDs and replace the ia_credentials_helper() function with your own function that manages authentication and creates an OAuth2Credentials object" and went ahead and used existing credentials that I used for PyDrive thinking it would be a simplification. It was only then that I found there seems to be no reasonable way to activate Google Sheets other than to follow the installation instructions completely.