0

I am stuck with sending push message from my server to xtify 2.0 c2dm. When I use the xtify console to test the push it works but when I send it from my server to xtify it is accepted with 202 status code but the message doesn't reach the device.

Following is the json is send to the xtify server

{"apiKey":"8abedd93-fdd0-4d70-a702-blahblah","appKey":"blaaah-9a51-4b30-b14b-43e2b2052324","xids":["4fdc997971a292dblaah1ee"],"sendAll": true,"content":{"subject": "Greetings Earthlings","message": "Take me to your leader","action":{"type":"DEFAULT"}}}

I tested it with various requests using Fiddler but it is accepted (202) but not reaching the device.

dharmin007
  • 1,612
  • 16
  • 17

1 Answers1

2

you have an XID and sendAll in the same payload. You can either send to one (or many) XIDs, send to all of your users, or send to tagged users. If you remove the sendAll element from your payload it should work.

This works using my credentials and with my sample app:

{
    "apiKey": "my api key",
    "appKey": "my app key",
    "sendAll": true,
    "content": {
        "subject": "Greetings Earthlings",
        "message": "Take me to your leader",
        "action": {
            "label": "Open app"
        }
    }
}

If still not working for you, I suspect a problem with your c2dm credentials. Make sure your sender ID used for C2DM is not the same as the email used on your device or emulator.

Submit a direct support request with your actual app key and will take a look at your config.

http://developer.xtify.com/display/support/Get+Support

Michael Bordash
  • 1,072
  • 1
  • 10
  • 20