Skip to content

This gem aims to let you quickly send SMS from JavaScript and Python using the Orange SMS API.

License

Notifications You must be signed in to change notification settings

honorableCon/OrangeSMS-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

This gem aims to let you quickly send SMS from JavaScript and Python using the Orange SMS API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published