I am trying to get the new Gmail Push notifications working as detailed here
https://developers.google.com/gmail/api/guides/push
I have managed to get the pubsub side of it working (created topic, subscription and can publish and pull messages OK) but it fails at the step
Grant Publish Rights on your Topic
The client I am using (.Net) does not support the required methods so I am using the API explorer. Using the Explorer I generate the following Request.
POST https://pubsub.googleapis.com/v1beta2/projects/vivid-canyon-90023/topics/iLink:setIamPolicy?key={YOUR_API_KEY}
{
"policy": {
"bindings": [
{
"role": "roles/pubsub.publisher",
"members": [
"serviceAccount:[email protected]"
]
}
]
}
}
Which yields a response Error of
{
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
}
Not sure what the issue is - has anybody had success with setting Publish Rights as prescribed?