gspread authentication throwing insufficient permission

后端 未结 3 1017
心在旅途
心在旅途 2020-12-03 21:38

Using developers.google.com we created api user and downloaded credentials as json file. Now On my macbook gspread authentication is working fine while using credentials.js

相关标签:
3条回答
  • 2020-12-03 22:07

    You appear to be using a service account. In order for the service account to access your sperad sheet it needs to have access to it.

    Make sure that you share the sheet with the service account email address you can do that though google drive web page

    0 讨论(0)
  • 2020-12-03 22:19

    Try to change your scope variable to the following:

    scope = ['https://spreadsheets.google.com/feeds',
             'https://www.googleapis.com/auth/drive']
    

    Make sure Drive API is enabled in API console.

    gspread has been upgraded and it's now based on API v4. It's faster but it requires updates in scope.

    Here's the same issue: https://github.com/burnash/gspread/issues/512

    0 讨论(0)
  • 2020-12-03 22:20

    IF you are unable to access even after updating the scope, try running this command in your terminal:

    sudo pip install 'gspread==0.6.2' --force-reinstall

    0 讨论(0)
提交回复
热议问题