https://github.com/nexmo/ruby-sms-customer-support
SMS Customer Support Application using Ruby and Nexmo
https://github.com/nexmo/ruby-sms-customer-support
tutorial
Last synced: 12 months ago
JSON representation
SMS Customer Support Application using Ruby and Nexmo
- Host: GitHub
- URL: https://github.com/nexmo/ruby-sms-customer-support
- Owner: Nexmo
- Created: 2016-12-12T15:45:02.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2025-05-01T07:40:30.000Z (about 1 year ago)
- Last Synced: 2025-05-22T22:06:19.524Z (about 1 year ago)
- Topics: tutorial
- Language: Ruby
- Homepage: https://developer.nexmo.com/tutorials/sms-customer-support
- Size: 25.4 KB
- Stars: 3
- Watchers: 13
- Forks: 4
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SMS Customer Support
A Rails (Ruby) app showing how to implements customer support system over SMS using the Nexmo SMS API.
## Prerequisites
* [A Nexmo account](https://dashboard.nexmo.com/sign-up)
* [Ruby 2.1+](https://www.ruby-lang.org/) and [Bundler](http://bundler.io/) installed
## Getting started
```sh
# clone this repository
git clone git@github.com:Nexmo/ruby-sms-customer-support.git
# change to folder
cd ruby-sms-customer-support
# install dependencies
bundle install
# create a .env
cp .env.example .env
```
Next you will need to sign up for a Nexmo account, get your API credentials from the API dashboard, register a SMS number, and put all of these details in your `.env` file.
Then you can start the server.
```sh
rails server
```
Finally make sure to link the callback URL for your number to your app. For this you will need a public IP or a tool like [ngrok](https://ngrok.com/). We highly recommend using the [Nexmo CLI](https://github.com/Nexmo/nexmo-cli) to link your number up to the callback URL:
```sh
> nexmo link:sms [your_nexmo_number] http://[your.domain.com]/support
Number updated
```
## Usage
Once your server is started:
* Visit [localhost:3000](http://localhost:3000/) on a mobile phone.
* Click the "Get support via SMS" link to open your SMS messaging app.
* Send a SMS to create a new support ticket.
* Your app will receive the incoming message in and respond back to your phone with a confirmation in seconds.
As this is a very simple starter app this app does not provide a way to reply to support requests. This is left as an exercise.
## License
This project is licensed under the [MIT license](LICENSE).