Skip to content

Nexmo/nexmo-rails-number-insights

Repository files navigation

Nexmo Number Insights with Rails

A Rails app to demonstrate how to use the Nexmo Number Insights API with Ruby on Rails.

Prerequisites

Getting Started

# clone this repository
git clone [email protected]:Nexmo/nexmo-rails-number-insights.git
# change to folder
cd nexmo-rails-number-insights
# install dependencies
bundle install
# copy example .env to actual .env
cp .env.sample .env

Next you will need to sign up for a Nexmo account, grabv your API credentials from the API dashboard, register a phone number and put your api_key and api_secret in the .env file.

Usage

To start your Rails application run the following from the command line:

# Set up the database
rake db:migrate
# Initialize the server
rails s

You can now visit localhost:3000/number_insights in your web browser.

You can enter any number from any country in the number input and choose any of the Number Insight options:

  • Basic
  • Standard
  • Advanced

More information on each of these can be found on Nexmo Developer.

As this is a simple starter app, this app does not validate or store the responses.

License

This project is licensed under the MIT License.

About

Get started with Nexmo Number Insights and Rails

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •