Code Monkey home page Code Monkey logo

smsproxy's Introduction

[SpringBoot] SMSProxy

Sample server-application that exposes a REST service able to send SMSs using MessageBird's API.

Application starts a Tomcat server on localhost (port 8443) and a scheduled task that will execute every second and send to MessageBird's API the messages pending.

  • It exposes 2 services:
    • request-sms (POST) to send a SMS.
    • report (GET) to check status of already sent SMSs.
  • It uses a H2 database running on memory, to store the created (and pending) SMSs. Meaning, you will lose all data if you reboot the application.
  • Server only accepts SSL communications (use ssl-server.crt as valid certificate).

Installation

Requirements

Step by step

  • Clone this repository.
git clone https://github.com/dpradom/smsproxy
  • Edit src/main/resources/application.properties to set your MessageBird's API key on sender.apiKey.
  • Build the project.
mvn clean install
  • Start it.
java -jar smsproxy-0.0.1-SNAPSHOT.jar

Usage example

Sample request to create a SMS using curl:

curl -k  --header "Content-Type: application/json" --request POST \
  --data "{\"recipient\":1555432112,\"originator\":\"INBOX\",\"message\":\"This is a test message.\"}" \
  https://localhost:8443/request-sms

Release History

  • 0.0.1
    • Work in progress

Meta

Daniel Prado โ€“ [email protected]

Distributed under the GPLv3 license. See LICENSE for more information.

smsproxy's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.