【发布时间】:2015-03-03 15:13:14
【问题描述】:
我正在尝试从 google 服务获取通知密钥,我遵循 http://developer.android.com/google/gcm/notifications.html 的文档并在客户端上生成通知密钥,但我在发布请求时遇到问题,得到错误 401 OK
{
"operation": "create",
"notification_key_name": "vitee",
"registration_ids": ["********"]
"id_token": "**************************************************"
}
这是我的请求的快照
![在此处输入图片描述][1]
【问题讨论】:
-
还要确保您已在开发者控制台中激活 GCM API。
-
我遇到了同样的错误,你解决了吗?我也在尝试在客户端中获取通知密钥。
-
看起来 notification_key_name 需要是获取您的 id_token 的用户的电子邮件,请参阅this answer。
标签: android push-notification google-cloud-messaging