我想在我的收件箱運行watch()
並將其發送到發佈/訂閱。Gmail的API手錶()無法正常工作
不過,我不斷收到此錯誤:
googleapiclient.errors.HttpError: <HttpError 400 when requesting https://www.googleapis.com/gmail/v1/users/me.com/watch?alt=json returned "Invalid topicName does not match projects/western-oarlock/topics/*">
我送的代碼是:
request = {
'labelIds': ['INBOX'],
'topicName': 'projects/flask-app/topics/myTopic'
}
service.users().watch(userId='me', body=request).execute()
爲什麼試圖聯繫western-oarlock
,而不是flask-app
?