我想通过Google Cloud Pub/Sub API接收新的Gmail通知 [英] I want to get new Gmail notify by Google Cloud Pub/Sub API
问题描述
我在googleapis上经历了非常糟糕的经历,失去了一个星期,但是失败了,所以我提出了一些问题以寻求大家的帮助.
创建主题后&从Google Cloud Flatform Console的PUB/SUB订阅(带有端点URL),我使用了代号为bellow的nodejs:
var gmail = google.gmail({ auth: {---my auth---}, version: 'v1' });
gmail.users.watch({
userId: "me",
resource: {
topicName: "projects/responsive-hall-xxxx/topics/xxxx",
labelIds: ["INBOX"]
}
}
但是出现错误403:
{
domain: 'global',
reason: 'forbidden',
message: 'Error sending test message to Cloud PubSub projects/responsive-hall-xxxx/topics/xxxx : User not authorized to perform this action.'
}
我尝试为我的pub/sub上的gmail帐户设置权限,但仍然没有成功.
请帮助, 谢谢!
是否已授予您对主题 But got the error 403: I tried to set permissions for my gmail account on the pub/sub but still unsuccess. Please help,
Thanks! Have you granted publish permission to 这篇关于我想通过Google Cloud Pub/Sub API接收新的Gmail通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!serviceAccount:gmail-api-push@system.gserviceaccount.com
的发布权限,如{
domain: 'global',
reason: 'forbidden',
message: 'Error sending test message to Cloud PubSub projects/responsive-hall-xxxx/topics/xxxx : User not authorized to perform this action.'
}
serviceAccount:gmail-api-push@system.gserviceaccount.com
for your topic as given here?