Skip to content

This is a simple App to test SMS messages provided by Simple Notification Service by Amazon

Notifications You must be signed in to change notification settings

baselka/sns-sms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Notification Service by Amazon (SMS).

This is a simple NodeJs app implemented in ExpressJs framework to test SMS messages provided by Simple Notification Service by Amazon.

Installation & Configuration

Clone the repo

// open your terminal and clone the repo 
$ git clone https://github.com/baselka/sns-sms.git

Extract project used packages

// inside the cloned project dir
$ npm install

Create a new .env file in the root dir of the project and copy paste the following :

AWS_ACCESS_KEY_ID = <your_access_key_id>
AWS_SECRET_ACCESS_KEY = <your_secret_access_key>
AWS_REGION = <your_instance_region>

Running the server

// Run the project 
$ nodemon server.js || $ node server.js

2. Routes / Endpoints

Subscribe phone number to topic/channel .

Method: POST
URL: /sns/sms/subscribe
Body: { phone } // +639774998*** fromat
Response: { 
	success: true || false,
        code: 200 || any status code 
	data: {
		message: 'success or error message'
	}
}

Send OTP to a subscribed number .

Method: POST
URL: /sns/sms/send
Body: { phone } // +639774998*** fromat
Response: { 
	success: true || false,
        code: 200 || any status code 
	data: {
		message: 'success or error message'
	}
}

About

This is a simple App to test SMS messages provided by Simple Notification Service by Amazon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published