Help me please. When starting a program that outputs data from google sheets, an error appears.
import httplib2
import apiclient.discovery
from oauth2client.service_account import ServiceAccountCredentials
# Работа с таблицами
CREDENTIALS_FILE = 'file_name.json'
credentials = ServiceAccountCredentials.from_json_keyfile_name(CREDENTIALS_FILE, ['https://www.googleapis.com/auth/spreadsheets', 'https://www.googleapis.com/auth/drive'])
httpAuth = credentials.authorize(httplib2.Http())
service = apiclient.discovery.build('sheets', 'v4', http = httpAuth) # Выбираем работу с таблицами и 4 версию API
spreadsheetId = '1oXzqYQ9HixjfkTJ7hmIVqrM7_uvYwPsHoEKqPdbaAgk'
driveService = apiclient.discovery.build('drive', 'v3', http = httpAuth)
access = driveService.permissions().create(
fileId = spreadsheetId,
body = {'type': 'user', 'role': 'writer', 'emailAddress': 'account@requests-329915.iam.gserviceaccount.com'},
fields = 'id'
).execute()
Error:
googleapiclient.errors.HttpError: <HttpError 403 when requesting (link) returned "Rate limit exceeded. User message: "Sorry, you have exceeded your sharing quota."". Details: "[{'domain': 'global', 'reason': 'sharingRateLimitExceeded', 'message': 'Rate limit exceeded. User message: "Sorry, you have exceeded your sharing quota."'}]">