GCM Error=MissingRegistration sending messages via JSON

前端 未结 4 949
你的背包
你的背包 2020-12-30 19:37

I\'m testing push GCM via Fiddler

Headers:

User-Agent: Fiddler
Authorization: key=AIzaSyAkXfcuLLCZ-5n18wwO6XeJ13g-z9ja
Host: android.googleapis.com
C         


        
4条回答
  •  误落风尘
    2020-12-30 20:01

    For the new cloud Message, when you want to send a dwonstream message from the server, you need to use "to" to declaim the target registration id.

    like below :

    https://gcm-http.googleapis.com/gcm/send
    Content-Type:application/json
    Authorization:key=AIzaSyZ-1u...0GBYzPu7Udno5aA
    
    { "data": {
        "score": "5x1",
        "time": "15:10"
      },
      "to" : "APA91bHun4MxP5egoKMwt2KZFBaFUH-1RYqx..."
    }
    

提交回复
热议问题