我正在尝试使用 python 和Python Mirror API Quickstart代码从我的 Glassware 共享一张卡片(其中的 html) 。
creds = StorageByKeyName(Credentials, '#####', 'credentials').get()
plus_service = util.create_service('plus', 'v1', creds)
moment = {"type":"http://schemas.google.com/AddActivity",
"target": {
"id": "target-id-1",
"type":"http://schemas.google.com/AddActivity",
"name": "The Google+ Platform",
"description": "A page that describes just how awesome Google+ is!",
"image": "https://developers.google.com/+/plugins/snippet/examples/thing.png"
}
}
google_request = plus_service.moments().insert(userId='me', collection='vault', body=moment)
result = google_request.execute()
我得到了这个回复:
HttpError: <HttpError 403 when requesting https://www.googleapis.com/plus/v1/people/me/moments/vault?alt=json returned "Insufficient Permission">
我可以理解这是一个权限问题,但我的问题是,向玻璃用户询问 G+ 权限的建议 UI 是什么?
此外,通过在请求的权限中添加“ https://www.googleapis.com/auth/plus.login ”,我得到了这个:https://www.googleapis.com/plus/v1/people/me/moments/vault ?alt=json 返回“未授权”>
提前致谢