Skip to content

newtonjain/TC-Disrupt-SF-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMS Proxy using Node and the Nexmo SMS API

This app used the Nexmo SMS API to demonstrate how to use build an SMS proxy for masked communication between users.

Prerequisites

You will need:

  • A free Nexmo account
  • Somewhere to host this web app, Heroku or Your Local Machine with ngrok both work well

Installation

git clone https://github.com/nexmo/node-sms-proxy.git
cd node-sms-proxy
npm install

Setup

Rename the config file:

mv example.env .env

Fill in the values in .env as appropriate.

If preferred you can set previously provisioned numbers in the PROVISIONED_NUMBERS configuration value.

Running the App

npm start

The application should be available on http://localhost:5000.

If you have not set up predefined numbers you can access http://localhost:5000/provision for the application to provision numbers.

Using the App

Register a conversation with the application so that mappings can be created between real user numbers and Nexmo virtual numbers. This is done by making a POST such as the following to http://localhost:5000/conversation:

POST /conversation HTTP/1.1
Host: localhost:5000
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded

userANumber=USER_A_NUMBER&userBNumber=USER_B_NUMBER

When you do this each of the users will receive a text. Reply to that text will allow the to communicate anonymously with each other.

You can see a list of registered conversations by accessing http://localhost:5000/conversations.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published