A Node.js application that demonstrates sending Rich Communications Services (RCS) Rich Card Carousels and interactive football-themed messages using the Vonage API.
You can find full step-by-step instructions on the Vonage Developer Blog. (Not published yet)
- Node.js installed on your machine.
- ngrok installed for exposing your local server to the internet.
- Vonage Developer Account
- A registered RCS Business Messaging (RBM) Agent.
- A phone with RCS capabilities for testing.
-
Clone this repository:
git clone [https://github.com/your-username/rcs-interactive-football.git](https://github.com/your-username/rcs-interactive-football.git) cd rcs-interactive-football
-
Install dependencies:
npm install
-
Configure environment variables:
- Rename
.env.example
to.env
. - Add your
VONAGE_APPLICATION_ID
,VONAGE_PRIVATE_KEY
,VONAGE_API_SIGNATURE_SECRET
, andRCS_SENDER_ID
values to the .env file.
- Rename
-
Add your Vonage private key:
- Place your
private.key
file in the root of the project directory.
- Place your
-
Start your Node server:
node src/index.js
-
Expose your local server with ngrok:
ngrok http 3000
- Copy the HTTPS forwarding URL provided by ngrok.
-
Test your app by sending an RCS message:
curl -X POST https://YOUR_NGROK_URL/send-initial-message \ -H "Content-Type: application/json" \ -d '{"to": "YOUR_RCS_TEST_NUMBER"}'
- Replace YOUR_NGROK_URL with your actual ngrok URL and YOUR_RCS_TEST_NUMBER with your test device number.
-
POST /send-initial-message
— Sends an initial RCS message with suggested replies. -
POST /inbound
— Handles inbound RCS replies and triggers interactive flows.
All images used in the message templates are stored in the public/ directory.
The main business logic is organized under src/services/ and src/templates/.
Configuration is managed in config/config.js and .env.
License MIT