Ilhasoft / RCApps.RapidPro-Channel

0 stars 1 forks source link

RCApps.RapidPro-Channel

About

Rapidpro-Channel is a Rocket.Chat app to enable the integration between RapidPro channels service and Rocket.Chat.

Installation

Prerequisites

  1. Clone the repository and change directory:
    git clone https://github.com/Ilhasoft/RCApps.RapidPro-Channel.git
    cd RCApps.RapidPro-Channel
  1. Install the required packages:
    npm install
  1. Give your branding to the Application:
    npm run build
  1. Deploy the App to an specific Rocket.Chat instance:
    rc-apps deploy --url <your-rocket-url> --username <your-admin-username> --password <your-admin-password>
  1. To publish the App on the Rocket.Chat Marketplace, run the following command:
    npm run publish

Refer to this guide if you need more info.

Integration Setup

  1. With the app installed, and with the secret provided on the Rocket.Chat claim page in RapidPro, go to Administration > Apps > this app, and paste the secret on the App's Secret field, then click Save Changes.

  2. Return to RapidPro, and proceed with the integration setup after setting the App's Secret field. This will automatically validate the integration between the app and RapidPro.

  3. Create a bot on Rocket.Chat and give it the livechat-agent role, so insert the bot username on the channel setup on RapidPro.

  4. To get the required Auth Token and User Id go to Profile > My account > Personal Access Tokens > Generate a token without 2FA, save the tokens as it will not be displayed again once the pop-up is closed.

API Reference

The following headers are required in for all incoming requests to ensure the requests being made from the intended RapidPro integration.

Content-Type:  application/json
Authorization: Token LHHKXX8ZMJTVUFAHSW2J5P6FSF4SCQRK

Error responses body returned in this pattern:

{
    "error": "error details message"
}

GET /secret.check

PUT /settings

POST /message

Webhooks

There are currently 1 configured webhook on the app.

The following headers are required in for all webhooks to ensure the requests are being made from the intended RapidPro integration.

Content-Type:  application/json
Authorization: Token LHHKXX8ZMJTVUFAHSW2J5P6FSF4SCQRK

POST