Google-api-ruby-client: watch_user endpoint returns Server Error

Created on 12 Mar 2018  Â·  3Comments  Â·  Source: googleapis/google-api-ruby-client

I tried to set up a push notification watch on the given user mailbox

watch_request_object = Google::Apis::GmailV1::WatchRequest.new topic_name: 'projects/:project_id/topics/:topic_name', label_ids: [':label_id']
res  = client.watch_user 'me', watch_request_object

I got backendError

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "backendError",
    "message": "Backend Error"
   }
  ],
  "code": 500,
  "message": "Backend Error"
 }
}

is this endpoint supported?

question

All 3 comments

It is. That generic 500 error makes me think something hasn't been completely set up yet.

Did you…

  • [ ] Create topic
  • [ ] Create a subscription for that topic
  • [ ] Add [email protected] as a publisher
  • [ ] Try the request without specifying any labelIds
    ?

* Add [email protected] as a publisher *

Did not see that in any doc...I had the same issue and that did the trick for me.

* Add [email protected] as a publisher *

Did not see that in any doc...I had the same issue and that did the trick for me.

To anyone reading the gmail push notification docs, the docs specifically say to use serviceAccount:[email protected]. That is not a valid name, but as @devtoro pointed out, you can use [email protected] (note the omission of serviceAccount:), which is the right one to use.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidraj picture davidraj  Â·  6Comments

bootstraponline picture bootstraponline  Â·  4Comments

jponc picture jponc  Â·  5Comments

jawadakram20 picture jawadakram20  Â·  6Comments

jiggneshhgohel picture jiggneshhgohel  Â·  6Comments