Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Bash API for Bouygues Telecom SMS unofficial API (5 SMS/day limitation)

License

Notifications You must be signed in to change notification settings

cyosp/bouyguestelecom-smsapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

bouyguestelecom-smsapi

A Bash API for Bouygues Telecom SMS unofficial API (5 SMS /day limitation)

Stable version BSD-3 license

bouyguestelecom-smsapi is a Bash library which allows to use Bouygues Telecom unofficial SMS API.

It's based on bouyguestelecom-sms.

Bouygues Telecom SMS unofficial API

To be able to use this feature, you must have subscribed a mobile line with Bouygues Telecom operator.

With a Bouygues Telecom account, using their Web interface, you are allowed to send until 5 SMS per day.

It's on this possibility bouyguestelecom-sms is based.

And so this Bash API.

Library files

This library is composed of two files:

  • /etc/bouyguestelecom-smsapi/bouyguestelecom-smsapi.conf.src

    The configuration file

  • /usr/lib/bouyguestelecom-smsapi/bouyguestelecom-smsapi.bash.src

    The library

Both are located inside the directory bouyguestelecom-smsapi which allows to build a Debian package.

Configuration file

Configuration file: /etc/bouyguestelecom-smsapi/bouyguestelecom-smsapi.conf.src is in fact a file which is sourced by the Bash library.

Thus syntax is the Bash one and is composed of the following variables:

Name Meaning Mandatory
LASTNAME Base64 Bouygues Telecom account last name false
LOGIN Plain or base64 Bouygues Telecom login true
PASS Plain or base64 password associated to login true
TO Target mobile phones numbers separated by: ';' character true

Example:

# Base64 Bouygues Telecom account last name
LASTNAME="TGFzdCBuYW1lCg=="
# Plain or base64 Bouygues Telecom login
LOGIN="0606060606"
# Plain or base64 password associated to login
PASS="1a2B3c4D5e6F7g"
# Target mobile phones numbers separated by: ';' character
TO="0707070707"

HOW TO

Use

To use the library there are only two steps:

  1. Source the library:
. /usr/lib/bouyguestelecom-smsapi/bouyguestelecom-smsapi.bash.src
  1. Call the function to send a SMS:
callBouyguesTelecomSmsApi "My first SMS"

In this example My first SMS will be sent to the number 0707070707 which is defined in the configuration file.

Exit code will be 0 in case of success, 1 otherwise.

Install

bouyguestelecom-sms

Build and installation steps are described in bouyguestelecom-sms repository.

Create Debian package

You can create the Debian package with the following commands:

# Move to the repository directory
cd /github/bouyguestelecom-smsapi/repository/path
# Generate the Debian package
sudo dpkg-deb --build bouyguestelecom-smsapi
# Update the package name following Debian convention
VERSION=$(grep "Version" bouyguestelecom-smsapi/DEBIAN/control | cut -d ' ' -f 2)
ARCH=$(grep "Architecture" bouyguestelecom-smsapi/DEBIAN/control | cut -d ' ' -f 2)
mv bouyguestelecom-smsapi.deb bouyguestelecom-smsapi_${VERSION}_${ARCH}.deb

License

bouyguestelecom-smsapi is released under the BSD 3-Clause License.

See the bundled LICENSE.md for details.

About

Bash API for Bouygues Telecom SMS unofficial API (5 SMS/day limitation)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages