Messaging-Consenter is a lightweight Django application for serving a consent form to users. Consent is then saved on the RapidPro contact matching the UUID in the URL. This might get rolled into https://github.com/praekeltfoundation/rp-sidekick at some point.
- Run docker container with the following environment variables set
- CONSENT_REDIRECT_URL (Optional) - URL to redirect a user to after they have provided consent (default: /consent/success/)
- RAPIDPRO_URL - URL for the RapidPro instance
- RAPIDPRO_TOKEN - authentication token for the RapidPro token
- RAPIDPRO_FLOW_ID (Optional) - the id of the RapidPro flow to start a user on once they have provided consent
- The RapidPro Organisation must have two custom fields for Contacts:
- consent_date (Date and Time field)
- consent ("true" or "false" Text field)
Build a link for the user using the domain for the application, the word "consent" and their RapidPro UUID. When they provide consent their RapidPro Contact will be updated and they will be redirected to CONSENT_REDIRECT_URL.
To set up and run messaging-consenter
locally, do the following:
$ git clone git@github.com:praekeltfoundation/messaging-consenter.git $ cd messaging-consenter $ virtualenv ve $ source ve/bin/activate $ pip install -e . $ pip install -r requirements-dev.txt
- black - this repository uses an opinionated python code formatter. See
pyproject.toml
for config.
See our ways of working for a guide on how to contribute to messaging-consenter
.