I had the remote API working for both Android and iOS fine for the past few days now, until today I found out that it isn't working as how I expected it anymore. Initially I thought that the problem was occurring at my end which forced me to revert code back to a stable point in time, but after some brute force checking I found out the problem is the fact that I am getting no Messages (notification code) in the Pushwoosh response!!

"..[PW] response: {'status_code':200, 'status_message':'OK', 'response':{'Messages'}:[' '] }..."

An thing interesting to note is the fact that the device I send this to, receives all the notifications I schedule all at once on creation! They also do not even appear in my Pushwoosh History as it use to!

Can anyone try out a quick test on their end please to confirm that it isn't just I experiencing this? Please do get back to me as soon as possible, my company plans to release this app in a few weeks!!

asked 30 Sep '14, 03:02
derng's gravatar image

derng
1914

edited 03 Oct '14, 11:16

Alex%20Spotar's gravatar image

Alex Spotar
3.6k6

Please refer to the recent post in our Blog:

For load balancing purposes we do not store messages sent through API with the “devices” parameter that contains less than 10 devices in an array. Due to this, such messages will not be displayed in your Push History.

However, as it’s necessary to see push reports during the testing phase, there’s a Debug Mode that you can use during your tests. Turning Debug Mode ON allows you to override this limit for 1 hour and save such pushes in the push history. Debug mode turns OFF automatically after 1 hour.

The Debug Mode can be activated on the Pushes page:

alt text

Besides, as these messages are no longer saved, the response from the Pushwoosh API has changed as well. If the Debug Mode is turned OFF, and you send the /createMessage request that contains less than 10 device tokens to Pushwoosh API, the server will return an empty value for “Messages” value, and an empty key for Unknown Devices instead of the Message Code.

For example, here’s the basic createMessage request with a list of less than 10 tokens in the “devices” parameter:

{
   "request":{
      "application":"application_code",
      "auth":"api_access_key",
      "notifications":[
         {
            "send_date":"now",
            "content":"Hello world!",
            "devices":["device_token1","device_token_2","device_token_3"]
         }
      ]
   }
}

With the Debug Mode turned ON Pushwoosh API returns the following response:

{
"status_code": 200,
"status_message": "OK",
"response": {
    "Messages": ["B036-16AC355D-7C36D4C7"],
    "UnknownDevices": {
        "B036-16AC355D-7C36D4C7": ["device_token1", "device_token_2", "device_token_3"]
    }
}

}

If the Debug Mode is turned OFF, which is default, Pushwoosh API returns response as follows:

{
"status_code": 200,
"status_message": "OK",
"response": {
    "Messages": [""],
    "UnknownDevices": {
        "": ["device_token1", "device_token_2", "device_token_3"]
    }
}

}

IMPORTANT: If you schedule push you will receive its message code, so you can delete the message through API if needed.

permanent link
answered 03 Oct '14, 11:15
Alex%20Spotar's gravatar image

Alex Spotar
3.6k6

edited 15 Jan '15, 07:05

This is really bad for all the apps using this on the market, especially how this was discovered and deployed live before other developers were made aware of these changes, and is certainly making me regret my newly purchased premium account.

Is there absolutely no way that this can be reverted? Or is there a work around for producing personalised notifications?

permanent link
answered 03 Oct '14, 17:00
derng's gravatar image

derng
1914

edited 03 Oct '14, 20:18

1

If you schedule message you will receive message code so you can delete the message. If you send the message straightaway you won't receive the message code as the message will be sent immediately.

(15 Jan '15, 06:10) shader shader's gravatar image

Wow I just read this after testing my new app for push notifications, and unless there is a way for the API to return the message id's for pushed messages for < 1 device token, then it's time once again to look for another push provider! I absolutely need the ability to push via the API to a single device token, and need to be able to store the message id for later purposes, specifically for cases where the message being sent is a future schedule push, and they want to delete it. I would have no way of being able to A) identify the scheduled push message, or B) delete it via the API. Big functionality gap! Any ideas or suggestions?!

permanent link
answered 14 Jan '15, 21:49
wallyyoung's gravatar image

wallyyoung
1

1

When message is scheduled to be delivered - you will receive message code. Only if the message is delivered "now" you won't receive message code.

(15 Jan '15, 06:09) shader shader's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×120
×83
×52
×18
×7

question asked: 30 Sep '14, 03:02

question was seen: 2,778 times

last updated: 15 Jan '15, 07:05