This is a simple NodeJs app implemented in ExpressJs framework to test SMS messages provided by Simple Notification Service by Amazon.
// open your terminal and clone the repo
$ git clone https://github.com/baselka/sns-sms.git
// inside the cloned project dir
$ npm install
AWS_ACCESS_KEY_ID = <your_access_key_id>
AWS_SECRET_ACCESS_KEY = <your_secret_access_key>
AWS_REGION = <your_instance_region>
// Run the project
$ nodemon server.js || $ node server.js
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'
}
}
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'
}
}