GCM未记录响应

时间:2015-11-12 07:26:36

标签: google-cloud-messaging

当registration_id为BLACKLISTED时,我得到了奇怪的GCM响应 有效载荷

{"data":{"title":"Your troopers were attacked"},"registration_ids":["BLACKLISTED"]}

响应是

{"multicast_id":9151224166188989772,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InvalidParameters"}]}

响应标头

   [headers] => Array
    (
        [content-type] => application/json; charset=UTF-8
        [date] => Thu, 12 Nov 2015 04:16:06 GMT
        [expires] => Thu, 12 Nov 2015 04:16:06 GMT
        [cache-control] => private, max-age=0
        [x-content-type-options] => nosniff
        [x-frame-options] => SAMEORIGIN
        [x-xss-protection] => 1; mode=block
        [server] => GSE
        [alternate-protocol] => 443:quic,p=1
        [alt-svc] => quic=":443"; p="1"; ma=604800
        [accept-ranges] => none
        [vary] => Accept-Encoding
        [transfer-encoding] => chunked
    )

[http_version] => HTTP/1.1
[status] => 200
[message] => OK

我在文档https://developers.google.com/cloud-messaging/http-server-ref#table9中找不到这样的错误。有谁知道这个错误表明了什么?

对于任何其他registration_id,例如" GOOGLE",我得到了正确的回复InvalidRegistration

1 个答案:

答案 0 :(得分:0)

我认为' BLACKLISTED'是一个保留字。谷歌提到你不应该使用保留字,但不提供完整列表。

这是基于阅读https://developers.google.com/cloud-messaging/http-server-ref的猜测,其中提到了这一点......

  

密钥不应该是保留字("来自"或以&#34开头的任何字词; google"或" gcm")。请勿使用此表中定义的任何单词(例如collapse_key)。

相关问题