Can I use OAUTH2 Service Accounts with Glass Mirror API?

115 views Asked by At

I'm trying to use a service account to insert a timeline notiification to my Glass. I've successfully used the technique below to access Google Drive within the same program. The App Engine code below is my attempt to do the same to access the Mirror API. No errors are generated and everything appears successful but I never see the notification on my Glass timeline.

Can I expect service accounts to work with the Mirror API like they do with Drive API?

http = httplib2.Http()
credentials = SignedJwtAssertionCredentials(serviceuseremail, key,
  scope=['https://www.googleapis.com/auth/glass.timeline',
         'https://www.googleapis.com/auth/glass.location'])
http = credentials.authorize(http)
mirror_service = build('mirror', 'v1', http=http)
body = {
  "text": "This item auto-resizes according to the text length",
  "notification": {
  "level": "DEFAULT"
   }
}
mirror_service.timeline().insert(body=body).execute()
0

There are 0 answers