New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oauth2 credentials not working #224
Comments
I was in the same situation and here's what I did:
from oauth2client.client import GoogleCredentials
credentials = GoogleCredentials.get_application_default()
credentials = credentials.create_scoped(['https://spreadsheets.google.com/feeds'])
gs = gspread.authorize(credentials)
sheet = gs.open('file').worksheet('sheet') References: |
This solve the authentication issue but now I can't access any of my spreadsheets by any means This is the error
thanks btw with the authentication issue EDIT: I've tried with
but still doen't work |
Same here |
@oinirio try to share this spreadsheet with an email address listed in your credentials. |
@burnash thanks is workning great now. I share spreadsheet with the |
yes, sharing the spreadsheet with the cryptic "client_email" value from the json file (not just the e-mail used to create the oauth2) fixed SpreadsheetNotFound for me, which popped today morning on my spreadsheet scanner tool And my app is using
|
to add to @mdalpi(Thank you by the way with the authentication issue): This is how you can set an environment variable on Windows (my issue) with a python script: |
Thanks this helped me a lot. :-) |
Hi @oinirio , I just met the same problem as yours .
And then , I share the sheet with client_email in json file , and it didn't work either. |
It should work as soon as you share it (or the next minutes). |
@frankxin just like @joyalexandre said it should be instant after you share it |
I came across this when the bug in my code was an improper spelled worksheet, a good way to check what is going on is to use gs.openall() method, that lists all available spreadsheets. |
Hi all, I shared the client_email which is in my JSON. My code runs fine, with no errors. But unable to open the spreadsheet. I am struck. My issue #256 |
@mdalpi Thanks! Using GOOGLE_APPLICATION_CREDENTIALS Works on openwrt-yun. For those trying to use gspread on the Yun, it seems the pyopenssl version is too old (version 0.10 on Yun) and apparently oauth2client calls the method sign from pyopenssl which is undefined so using SignedJwtAssertionCredentials breaks. For the environment variable, you must add the following line to the configuration file /etc/profile then restart: |
Today a deprecation warning prevent me from starting my script so after I follow this instructions but after running my script got this error
here the error is clearly because there's not crypto library but then I install pyopenssl ( I've try with both disto and pip packages ) the next error appears
I'm stuck in here.
The text was updated successfully, but these errors were encountered: