nathanbaleeta / ureport_mobile

U-Report is a social messaging tool and data collection system developed by UNICEF to improve citizen engagement, inform leaders, and foster positive change. The program sends polls and alerts to its participants, collecting real-time responses, and subsequently publishes gathered data.
https://ureport.in/
GNU General Public License v3.0
6 stars 1 forks source link

Contact Registration using FCM on RapidPro #25

Closed nathanbaleeta closed 4 years ago

nathanbaleeta commented 4 years ago

In order to send and receive messages on RapidPro you need to set up a channel. A channel is a phone number or social network account which RapidPro can use to send and receive messages on your behalf.

Some of the available channels on RapidPro include: voice; social media channels, such as Facebook Messenger, Telegram, WhatsApp, Viber, Twitter; Firebase Cloud Messaging, FreshChat, External API, Twilio, Android Phone.

You can choose to use an Android phone and your own cell phone plan, or you can connect you with a service provider in your country directly. However Firebase Cloud Messaging seems to offer the best solution for a mobile phone app use case such as U-Report mobile.

Before RapidPro allows you to send and receive messages, contact registration is mandatory.

Contact Register: To register contacts, POST to the following URL with the parameters urn, fcm_token and optionally name.

https://app.rapidpro.io/c/fcm/1dc76b95-1013-4c82-8b0f-c05600f0b18c/register