I have had very bad experiences with googleapis, lost one week but failed so I open questions to find the help of everybody.
After creating a topic & subscription (with endpoint URL) from PUB/SUB of Google Cloud Flatform Console, I used nodejs with code bellow :
var gmail = google.gmail({ auth: {---my auth---}, version: 'v1' });
gmail.users.watch({
userId: "me",
resource: {
topicName: "projects/responsive-hall-xxxx/topics/xxxx",
labelIds: ["INBOX"]
}
}
But got the error 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.'
}
I tried to set permissions for my gmail account on the pub/sub but still unsuccess.
Please help, Thanks!