0

When trying to send a push notification:

{'event[environment]': 'development', 'event[notification_type]': 'push', 'event[message]': u'payload=VGhpcyBpcyBhIHB1c2ggbm90aWZpY2F0aW9uIEFQSSBUZXN0', 'event[user][ids]': 'xxx', 'token': xxx'}

I get following result from the API.

{"code":null,"message":"invalid byte sequence in UTF-8"}

The Payload is a base64 encoded string, so it should work properly. Anyone an idea what's wrong here?

thanks, phil

hellphil
  • 415
  • 6
  • 10

1 Answers1

0

It looks like your message is not in the correct format:

Did you encode a JSON Object like the following one as Base64 ?

"aps": { "alert": "Some text", "badge": 1, "sound": "default" } 
melbic
  • 11,988
  • 5
  • 33
  • 37
  • Thanks for the hint, the actual json should look like this: {"aps":{"alert":"Some text","badge":1,"sound":"default"}} – hellphil Jul 11 '13 at 13:46
  • The funny thing is that while the notification is now sent, the api still returns the error message. – hellphil Jul 11 '13 at 13:49
  • Hi Igor, the call did not cause an error, just replied with: {"code":null,"message":"invalid byte sequence in UTF-8"} – hellphil Jul 17 '13 at 08:34