3

When i am trying to test the REST API provided by Parse.com with Fiddler, it return an error. please find the enclosed screen capture. I can send the push notification on parse.com. but not from REST API.

Screenshot here:
http://s24.postimg.org/stwspcyir/image.jpg
http://s9.postimg.org/5r3guagh9/image.jpg

=== Follow Up === found the correct syntax of the JSON for push notification:

{"data": { "alert": "test message", "sound": "", "badge": "Increment" },"channel":"abc"}

but i found that if the channel is empty, the notification will not work, all i have to do is create channels for the device..... is it true ??

1 Answer 1

9

Found the answer finally:

if you have channels, provide the channel name:

{"data": { "alert": "321213", "sound": "", "badge": "Increment" },"channel":"channel name"}

if there is no channels (default no channel), send to all devices:

{"data": { "alert": "321213", "sound": "", "badge": "Increment" },"where": { "deviceType": "ios" }}
Sign up to request clarification or add additional context in comments.

2 Comments

A question. Is free parse.com account allow for channel?
yes. i am using free account with channel for my ios push notification app

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.