Как отслеживать изменения в Google Drive API?

Я хочу получать уведомления, когда файл изменяется.

Пытаюсь выполнить:

from google.oauth2 import service_account
from googleapiclient.discovery import build


FILE_ID = 'FILE_ID'
SCOPES = ['https://www.googleapis.com/auth/drive']
SERVICE_ACCOUNT_FILE = 'credentials.json'

credentials = service_account.Credentials.from_service_account_file(SERVICE_ACCOUNT_FILE, scopes=SCOPES)
service = build('drive', 'v3', credentials=credentials) 


print(service.files().watch(fileId=FILE_ID).execute())

Выдаёт ошибку:

googleapiclient.errors.HttpError: <HttpError 400 when requesting https://www.googleapis.com/drive/v3/files/167VYU1cZzYv8q4p1HoLsDS8e85Qe1iY38a8A53c3uI4/watch?alt=json returned "entity.resource". Details: "entity.resource">

Ответы (0 шт):