Giter Site home page Giter Site logo

clickatell's Introduction

Clickatell SMS Library

To use this gem, you will need sign up for an account at www.clickatell.com. Once you are registered and logged into your account centre, you should add an HTTP API connection to your account. This will give you your API_ID.

Basic Usage

You will need your API_ID as well as your account username and password.

require ‘rubygems’ require ‘clickatell’ api = Clickatell::API.authenticate(‘your_api_id’, ‘your_username’, ‘your_password’) api.send_message(‘447771234567’, ‘Hello from clickatell’)

To send a message to multiple recipients, simply pass in an array of numbers.

api.send_message([‘447771234567’, ‘447771234568’], ‘Hello from clickatell’)

Command-line SMS Utility

The Clickatell gem also comes with a command-line utility that will allow you to send an SMS directly from the command-line.

You will need to create a YAML configuration file in your home directory, in a file called .clickatell that resembles the following:

  1. ~/.clickatell
    api_key: your_api_id
    username: your_username
    password: your_password

You can then use the sms utility to send a message to a single recipient:

sms 447771234567 ‘Hello from clickatell’

Alternatively, you can specify the username and password as a command line option. Run sms without any arguments for a full list of options.

The sms utility also supports multiple, comma-separated recipients (up to 100).

sms 447771111111,447772222222 “Hello everyone”

See http://clickatell.rubyforge.org for further instructions.

clickatell's People

Contributors

dweinand avatar johnpg avatar tomtoday avatar

Stargazers

 avatar

Watchers

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