Skip to content

Ruby module for communicating with MOBtexting enterprise Messaging and Verify Services

Notifications You must be signed in to change notification settings

mobtexting/mobtexting-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ruby plugin for mobtexting

This package makes it easy to send Mobtexting notifications.

Installation

Add the dependency to your Gemfile

gem 'mobtexting_sms', :git => 'https://github.com/mobtexting/mobtexting-ruby.git'

Then run:

bundle install

Send SMS Usage

require "mobtexting_sms"

access_token = 'xxxxxxxxxxxxxxxxx'

client = MobtextingSms::Client.new(access_token)
response = client.send(
        '1234567890', # to phone number
        'MobTxt', # sender
        'hello from ruby!', # message body
        'P' # service
)

puts(response)

Verify Usage

Send

verify = MobtextingSms::Verify.new(access_token)
response = verify.send('1234567890') # to phone number
puts(response)

Check

verify = MobtextingSms::Verify.new(access_token)
response = verify.check(
	'705f1cd4-93e0-492e-b6f8-ffdf9dac68f5', # id received while send
	'123456' # token entered by user
)
puts(response)

Cancel

verify = MobtextingSms::Verify.new(access_token)
response = verify.cancel('705f1cd4-93e0-492e-b6f8-ffdf9dac68f5') # id received while send
puts(response)

About

Ruby module for communicating with MOBtexting enterprise Messaging and Verify Services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published