Configure Push

After launching the parse server successfully, click on the task manager, find your app listed and under actions click the push button. You can configure multiple apple push certificates for a single app. The current limitation is six certificates per app. However, this limitation is not fixed and you can contact us should you require more certificates for your app.

You must configure your clients to receive push using this guide.



NodeChef only supports client push and scheduled push for Parse Server starting with version 2.2.19. You can ensure you are running version 2.2.19 or higher by navigating to the Task manager > App actions > Server Settings > Runtime version. Select version 2.2.19 or higher and update your Parse Server.


Configuring client push

By default, client push is not enabled for your deployment. To enable client push navigate to the Task manager > App actions > Push. You can then enable client push by selecting the checkbox and updating your server with the save changes button.



Scheduling Pushes

You can schedule a push in advance by specifying a push_time. For example, if a user schedules a game reminder for a game on March 19th, 2015 at noon UTC, you can schedule the push notification by sending:

curl -X POST \ -H "X-Parse-Application-Id: ${APPLICATION_ID}" \ -H "X-Parse-REST-API-Key: ${REST_API_KEY}" \ -H "Content-Type: application/json" \ -d '{ "where": { "user_id": "user_123" }, "push_time": "2015-03-19T12:00:00Z", "data": { "alert": "You previously created a reminder for the game today" } }' \ https://app-3.nodechef.com/parse/push

Remarks

The scheduled time cannot be in the past, and can be up to two weeks in the future. It must be an ISO 8601 date with a date, time, and timezone, as in the example above. To schedule an alert for 08/22/2015 at noon UTC time, you can set the push_time to 2015-08-022T12:00:00.000Z.
By default, NodeChef implements push localization as such the UTC time is translated to the local time of the installation by using the value set on the locale attribute of the _installation object. If you want to override this behaviour and deliver the push in UTC time irrespective of the locale, you can set the attribute "push_time_handling": "literal" in addition to the "push_time".

Deleting a Scheduled Push

A successful push request will return for example the below JSON document. You can then use the value of the id attribute to remove the pending push.

{"result":true,"id":"57f279bfe5616d2a5e9f60aa"}

Use a DELETE request to the endpoint <your_parse_mount>/pendingpush/<id> to remove the pending push

curl -X DELETE \ -H "X-Parse-Application-Id: " \ -H "X-Parse-Master-Key: " \ https://app-3.nodechef.com/parse/pendingpush/57f279bfe5616d2a5e9f60aa


Configure parse server push