gspread.v4.exceptions.APIError - Insufficient Permission
See original GitHub issueHello. After the OS was reinstalled, the script stopped working. gspread 2.0.0 python 2.7.12
code
# -*- coding: utf-8 -*-
import gspread
from oauth2client.service_account import ServiceAccountCredentials
scope = ['https://spreadsheets.google.com/feeds']
credentials = ServiceAccountCredentials.from_json_keyfile_name('123.json', scope)
gc = gspread.authorize(credentials)
wks = gc.open("123")
error
Traceback (most recent last call last):
File "test.py", line 11, in <module>
wks = gc.open ("123")
File "/usr/local/lib/python2.7/dist-packages/gspread/v4/client.py", line 103, in open
self.list_spreadsheet_files ()
File "/usr/local/lib/python2.7/dist-packages/gspread/v4/client.py", line 80, in list_spreadsheet_files
r = self.request ('get', url)
File "/usr/local/lib/python2.7/dist-packages/gspread/v4/client.py", line 73, in request
raise APIError (response)
gspread.v4.exceptions.APIError: {
"error": {
"errors": [
{
"domain": "global",
"reason": "insufficientPermissions",
"message": "Insufficient Permission"
}
],
"code": 403,
"message": "Insufficient Permission"
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:19 (6 by maintainers)
Top Results From Across the Web
getting 403 insufficient permission error on gspread v2 ...
... try to amazon linux server it gives insufficent permission error gspread.v4.exceptions.APIError: { "error": { "errors": [ { "domain...
Read more >python - gspread authentication throwing insufficient permission
when moved same config to linux server on aws its giving 403 insufficient permission error. Pip and python version are same. exception gspread....
Read more >Python – gspread authentication throwing insufficient permission
Using developers.google.com we created api user and downloaded credentials as json file. Now On my macbook gspread authentication is working fine while ...
Read more >Client — gspread 5.4.0 documentation
An instance of this class communicates with Google API. Parameters: auth – An OAuth2 credential object. Credential objects created by google-auth. session – ......
Read more >Setting up Python to Connect to Google Sheets
The issue I was seeing was as follows: gspread.exceptions.APIError: {'errors': [{'domain': ' ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, try to change your scope to the following:
I can confirm the exact same issue. I also tried regenerating service api creds.