This is a very basic express server that responds to a POST request with some cards from Espress Server Tarot
- Clone this repository
- Install dependencies:
npm install
- Start:
npm start
ornode app.js
ornodemon
These instructions are for making the Twilio API for Whatsapp make a request to our server. The server must be deployed on the web, so I deployed mine using Heroku.
- In the whatsapp/learn page of Twilio, we need to follow the instructions of joining the Whatsapp sandbox.
- In the whatsapp/sandbox page of Twilio, there will be a input of WHEN A MESSAGE COMES IN there we will set the url of our express server.
- The twilio API is gonna make a POST request to our server and we need to handle it, in my case I respond with a GET request to my tarot server (link above), and then express sends a respond in the form of the TwiML™ standard.
- Anytime sends a message to the twilio bot, it will respond with the tarot cards.