Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Sending push notifications from server - enterprise account needed?

$
0
0

We are using the free version of ACS to send push notifications to our users. We have developed our own CMS from which the push notifications are send to the ACS.

We use the following PHP code to send a push notification from our CMS:

// The payload defines the push notifications
$payload = array("vibrate" => 1, "sound" => "default", "alert" => "$bericht", "title" => "Notificatie");
// Array is the post data
$array = array("payload" => json_encode($payload),
             "channel" => "some_channel",
                     "to_ids" => "everyone");
 
// Use curl to send the request to the Appcelerator servers
$session = curl_init("https://api.cloud.appcelerator.com/v1/push_notification/notify.json?key=$app_key&_session_id=".$session);
 
curl_setopt($session, CURLOPT_POSTFIELDS, $array);
curl_setopt($session, CURLOPT_RETURNTRANSFER, True);
 
// Do request
$result = curl_exec($session);
All subscribers to the channel 'some_channel' should receive the push notifications. My question is if the options "to_ids" => "everyone" is available in the free version of ACS or if this is an enterprise feature.

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>