我想在云发布/子主题上创建监视但无法创建它.为此,我正在使用其余请求
request_Req.post({
url:'https://www.googleapis.com/gmail/v1/users/me/watch',
headers:{
'content-type': 'application/json',
'Authorization': 'Bearer '+ access_token,
},
scope : [
'https://mail.google.com/'
],
'body': JSON.stringify({
'topicName' : "/projects/ProjectId/topics/TopicId",
'labelIds' : ["INBOX"]
});
}),function(error, resp, body){
});
Run Code Online (Sandbox Code Playgroud)
但是我收到了错误消息 Error sending test message to Cloud
PubSub/projects/ProjectID/topics/TopicId : Resource not found resource=TopicId