You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library is a Rails application example of using the Ruby Whatsapp SDK library to communicate between a Web application with Whatsapp.
This application lets you send Whatsapp messages and view them on the Web.
Demo
My.Movie.12.mp4
Getting started
Clone this repository.
Run bundle install.
Run the server bundle exec rails s
Modify the access token in the whatsapp_sdk initializer. Note that if you change the file you have to restart the server since the file lives under initializers.
You can use webhooks to receive alerts when users communicate with your account. To do that, we need to start a service and an endpoint and tell Meta to ping that endpoint whenever a Meta event happens. See the Meta documentation for the list of events available.
Make sure that the gemfile is pointing to the right whatsapp_sdk version.
Run the server bundle exec rails s.
Run ngrok http 3000
Copy the ngrok address from the console e.g. https://1234-123-123-12-123.ngrok.io
Add the address to the config/environments/development.rb file.
Go to the Meta panel and subscribe to the webhook. You will need to paste the ngrok address in Meta.
Development
This repository uses tailwind-css rails. To update the assets automatically, run rails tailwindcss:watch.
About
Ruby on Rails example application that communicates with Whatsapp