RapidPro is software for communicating with many people via different messaging channels and is commonly used by aid agencies such as UNICEF.

We provide an easy to use integration for MoyaApp detailed below. If you run into any issues, or have questions or feedback, please let us know by sending a message to

Setup steps

Get a Moya token and endpoint

Please contact us at with your details to get the account set up. We will provide you with a token, and optionally a number if you don't have an existing number to use.

RapidPro configuration

In your RapidPro/TextIt deployment, go to the "Add a Channel" page and choose "External API".

We support rapidpro quick replies and these can be enabled by adding {{quick_replies}} to the request body as shown below

Configure the following parameters (many of which are just left at the default values):

Once you have submitted this page, the integration will be configured in RapidPro.

You will then be presented with a page showing the configuration. Please provide us with the "Received URL" so we can forward messages from users to your RapidPro instance, and then the setup will be complete.

Send datafree images in Rapidpro

In order to send a datafree image/document in your rapidpro chatbot you first have to create a datafree url for your image/document using the instructions documented here Once you have a datafree url for your image you can send it by calling a webhook from your chat flow. Please note that this link is only valid for 30 days

    "to": "@(replace(input.urn, "tel:+", ""))",
    "recipient_type": "individual",
    "type": "image",
        "image": {
            "url": "datafree_image_url"

Refer to images below on how the setup should look like in rapidpro

Post body

Request headers

Make KYC request

In your rapidpro chat flow you can make a kyc request in two steps as documented here

Before you start you may need to set a global variable in rapidpro for the KYC url. The value of the global should be and the name KYC URL

  1. Make KYC data request
  2. Fetch data
    "reason": "Your reason",
    "data": [
            "property": "first_name",
            "reason": "Your reason",
            "required": true
            "property": "last_name",
            "reason": "Your reason",
            "required": true

1. KYC data request

Make a KYC request in rapidpro as shown in the image below. The webhook call is a POST request to @globals.kyc_url/start/@(replace(input.urn, "tel:+", "")). Name the result of the flow as start_kyc_data_request

A successful request will return a request id. Use the request id to fetch KYC data.

2. Fetch Data

In order to fetch user data after successful data request, you make another webhook call. This time it should be a GET request and the get url should look like:


@(run.results.start_kyc_data_request.extra.requestId) will get the request id from the previous step that you named start_kyc_data_request.

This request has two possible responses, completed and pending. Completed means the user data request has been completed and you can move to the next step. Pending means the request has not yet been approved or denied. To handle these two cases you need to create a "split by custom expression" node in your rapidpro flow.

Connect the pending end of the split to the previous node if the result is pending and if the result is approved you can continue building other parts of the flow. User data can be accessed from other parts of the flow like @run.results.fetch_kyc_data.extra.results.first_name.value

@run.results.fetch_kyc_data.extra.results refers to the results for the "fetch data" step and first_name.value refers to the value of the first name returned by the KYC API