According to the following post #244 to authenticate the credential we can define GOOGLE_APPLICATION_CREDENTIALS environment variable to directly authenticate.
Here is what I did in my code.
import gspread
from oauth2client.client import GoogleCredentials
credentials = GoogleCredentials.get_application_default()
credentials.create_scoped(['https://spreadsheets.google.com/feeds'])
gc = gspread.authorize(credentials)
wks = gc.open("hello").sheet1
But when I run this it raises an oauth2client.client.HttpAccessTokenRefreshError: invalid_grant
Any suggestions on how to resolve this?
Thanks,