Using Gspread To Read From A Google Drive Spreadsheet Without Logging In
Solution 1:
To be honest I don't know what the error is coming from. Pasting more of the stack trace and some additional parts of your code might help.
Anyway, as you mentioned yourself you prefer to not use your login information (email/password).
GSpread also offers to log in by using gspread.Client(auth, http_session=None)
,
where the auth
parameter is OAuth2 credential object. Credential objects are those created by the oauth2client library.
I found this link very helpful to get the hang of it and getting it up working.
You won't log in anymore with your account, which is good, instead it will obtain OAuth 2.0 client credentials from the Google Developers Console. Then your client application requests an access token from the Google Authorization Server, extracts a token from the response, and sends the token to the Google API that you want to access.
Solution 2:
Have you made your spreadsheet public to the web? With that you can do what you want, I've posted code samples Here Loading a generic Google Spreadsheet in Pandas
Post a Comment for "Using Gspread To Read From A Google Drive Spreadsheet Without Logging In"