Send Push Notifications
Catalyst enables you to send push notifications to 50 users in a single function call. You can add the user IDs of all users to be notified in an array as shown below. You must then pass the array to the send_notification() method, along with the message string to include in the notification. This string can be plain text, HTML, or a JSON object to be parsed.
To know more about the component instance push_notification_service used below, please refer to this help section.
Parameters Used
Parameter Name | Data Type | Definition |
---|---|---|
notification_message | String | A Mandatory parameter. Will store the notification message. |
user_list | Array | A Mandatory parameter. Will store the IDs or email addresses of the users to whom notification has to be sent. |
copy#Send push notifications using userID's push_notification_service = app.push_notification() user_list = [1234556789098, 6756467677890] logging.info(push_notification_service.web().send_notification("Hi there! The task you scheduled has been completed.", user_list))
You can also send the notifications to users by including their email addresses instead of their User IDs. You must add the email addresses in an array, and pass it to send_notification() along with the message string in the same way.
copy#Send push notifications using user email addresses's push_notification_service = app.push_notification() user_list = ["amelia.burrows@gmail.com", "emma.hillary@gmail.com"] logging.info(push_notification_service.web().send_notification("Hi there! The task you scheduled has been completed.", user_list))
Last Updated 2025-03-28 18:24:49 +0530 +0530
Yes
No
Send your feedback to us