Code Monkey home page Code Monkey logo

orangesms-api's Introduction

Orange SMS API ๐Ÿ“ฌ

Made-In-Senegal

Orange SMS is a client library that allow you to send SMS with Javascript and Python using the Orange SMS API

Disclaimer โ›”

This gem is not an official client of Orange, in order to use the client you need to create a Orange SMS API and to register an app in the developer dashboard that orange provide to you.
After registering your app you can ask for SMS integration approval (this process can take time :)
The registration process is detailed here

Instead of reading and trying to understand once again how the Orange SMS API work this gem aims to let you quickly send SMS from JavaScript and Python using the Orange SMS API.

Check this link to find the steps of app creation.

Install ๐Ÿ“ฅ

Via NPM

npm i orange-sms-client

Usage โœ…

  1. Copy your client id here (if you have already create an app)
  2. generate token with getToken function
  3. send sms with sendSMS function

Exemple : usageExample.py | usageExample.js

JavaScript ๐Ÿ’›

const clientID = "your clientID"
const token = await getToken(clientID)
let senderAdress = "+2210000"
let address = "+221{{receiver}}"
sendSMS(senderAdress, address, 'message', token)

Python ๐Ÿ

clientID="your clientID"
token = getToken(clientID)
senderAdress = "+2210000"
address = "+221{{receiver}}"
sendSMS(senderAddress, receiverAddress, "message", token)

Modules

  • sendSMS : for sending SMS

    • params :
      • senderAddress
      • receiverAddress
      • message
      • token
    • return
      • response
  • getToken : to get token

    • params :
      • token
    • return :
      • token
  • showBalanceSMS : to show balance

    • params :
      • token
    • return :
      • balance
  • getUsageStats : to get usage stats

    • params :
      • token
    • return :
      • stats

Contributing ๐Ÿค

Bug reports and Pull Requests are welcome ๐Ÿ‘‹๐Ÿฝ
You can tell me HERE

License ๐Ÿ”–

This project is under MIT License.

orangesms-api's People

Contributors

honorablecon avatar daoodaba975 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.