0

I use pushbots for notification in my app. I am using cordova.

I looked at the api and they required the platform number 0 for iphone and 1 for android. Why I need to give them the platform? in the site their is the list of the tokens with the platforms so they already know the platform.

can I give them some another value for android and also for iphone? or to send twice, one time with 0 and on time with 1?

1 Answers1

0

According to this page in the docs: https://pushbots.com/developer/docs/api-batch_push - you CAN provide multiple platform numbers as an array:

0 for iOS.
1 for Android.
2 for Chrome
e.g. [0,1] to push to Android and iOS.

And then again later in their curl example, you can see that platform is an Array:

curl -X POST \
-H "x-pushbots-appid: 54cc0a511d0ab13c0528b459d" \
-H "x-pushbots-secret: 1444fe8be3324ff7128f25aa18cdee12" \
-H "Content-Type: application/json" \
-d '{ "platform" : Array ,  "tags" : Array ,  "sound" : String ,  "badge" : String ,  "schedule" : String ,  "except_tags" : Array ,  "alias" : String ,  "except_alias" : String ,  "payload" : JSON , }' \
https://api.pushbots.com/push/all
random_user_name
  • 25,694
  • 7
  • 76
  • 115