I use GAE in python as my third party server to send message to the
mobile device.
The collapse_key has already been written into payload but it still
return Error=MissingCollapseKey.
Could someone help me? Thanks.
This is my code:
auth = "GoogleLogin auth=" + key
message = "my message"
rid = "APA91bFZK1AJgDjGvs........."
url = "
https://android.apis.google.com/c2dm/send"
form_field = {"registration_id":rid, "collapse_key": "1", "data.msg":
message}
formdata = urllib.urlencode(form_field)
result = urlfetch.fetch(url=url,
payload=formdata,
method=urlfetch.POST,
headers={'Authorization':auth},
)