python - Access google docs using gspread -


i trying access google docs using gspread utility , successful when tried below code on google doc

import gspread         g = gspread.login('gmailid', 'password') worksheet = g.open('googlesheetname').get_worksheet(0)           val = worksheet.cell(2, 1).value        print val 

but when tried same code corporate account uses google server, getting below error:

  raise authenticationerror("unable authenticate. %s code" % ex.code) gspread.exceptions.authenticationerror: unable authenticate. 500 code 

can please me on this?

see author of gspread says here:

two factor authorization

in case google account protected 2 factor authorization, have create application-specific password , use email login usual.

otherwise authenticationerror: unable authenticate. 403 code when trying login.


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -