Coder Social home page Coder Social logo

hyiten / smscomet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alvaroespinola/smscomet

0.0 0.0 0.0 4.64 MB

Android APP that is sending SMS from a php script and will forward the incoming SMS to the same php script

Kotlin 91.74% PHP 8.26%

smscomet's Introduction

SMSComet

Original from https://github.com/juancrescente/SMSHub

Modified for my need, RO language, only one URL for PHP.

Added deviceSecret in POST request.

Olso added "keepScreenOn" as a workaround "not sending SMS if screen is off"

settings

you can customize the next settings directly in the application

Send SMS:

  • Enable sending: whether the app should read from the API and send messages
  • send URL: messages will be parsed from this URL, you return a JSON containing message, number and id
  • interval: the app will check whether there is an incoming message for sending each specific interval in minutes
  • device id: device id used in POST request
  • device Secret: device Secret used in POST request

How sending SMSs works

1- The application connects at regular intervals to a URL

POST https://yourcustomurl.com/send_api
    deviceId: 1
    deviceSecret: 1234
    action: SEND

2- It should read a JSON containing message, number and id, or an empty response if there is nothing to send

[{ "message": "hola mundo!", "number": "3472664455", "messageId": "1" }]

Or Array of JSON

[{ "message": "hola mundo!", "number": "3472664455", "messageId": "1" },{ "message": "hola mundo!", "number": "3472664454", "messageId": "2" }]

3- The app will send the SMS message to number

4- Once sent (or failed) the app will notify the status to the status URL

POST https://yourcustomurl.com/send_api
    deviceId: 1
    deviceSecret: 1234
    messageId: 1
    status: SENT
    action: STATUS

5- Once delivered the app will notify the status to the status URL

POST https://yourcustomurl.com/send_api
    deviceId: 1
    deviceSecret: 1234
    messageId: 1
    status: DELIVERED
    action: STATUS

Possible status values are: SENT, FAILED, DELIVERED (notice that it is unlikely but possible to get the DELIVERED update before the SENT update due to requests delay).

How receiving SMSs works

1- Each time a SMS is received the app will notify the received URL

POST https://yourcustomurl.com/send_api
    deviceId: 1
    deviceSecret: 1234
    number: 3472556699
    message: Hello man!
    action: RECEIVED

smscomet's People

Contributors

floringhimie avatar alvaroespinola 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.