Skip to content
Messente public API libraries merged into one Ruby library
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.openapi-generator
docs
lib
spec
.gitignore
.openapi-generator-ignore
.rspec
.rubocop.yml
.travis.yml
Gemfile
Gemfile.lock
README.md
Rakefile
git_push.sh
messente_api.gemspec

README.md

Messente API Library

  • Messente API version: 1.0.2
  • Ruby gem version: 1.0.2

Messente is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds tools to help organizations connect their services to people anywhere in the world.

Installation

Install Messente API library with gem install messente_api.

Features

Messente API has the following features:

Messente API Library provides the operations described below to access the features.

BlacklistApi

  1. Adds a phone number to the blacklist add_to_blacklist
  2. Deletes a phone number from the blacklist delete_from_blacklist
  3. Returns all blacklisted phone numbers fetch_blacklist
  4. Checks if a phone number is blacklisted is_blacklisted

ContactsApi

  1. Adds a contact to a group add_contact_to_group
  2. Creates a new contact create_contact
  3. Deletes a contact delete_contact
  4. Lists a contact fetch_contact
  5. Lists groups of a contact fetch_contact_groups
  6. Returns all contacts fetch_contacts
  7. Removes a contact from a group remove_contact_from_group
  8. Updates a contact update_contact

DeliveryReportApi

  1. Retrieves the delivery report for the Omnimessage retrieve_delivery_report

GroupsApi

  1. Creates a new group with the provided name create_group
  2. Deletes a group delete_group
  3. Lists a group fetch_group
  4. Returns all groups fetch_groups
  5. Updates a group with the provided name update_group

OmnimessageApi

  1. Cancels a scheduled Omnimessage cancel_scheduled_message
  2. Sends an Omnimessage send_omnimessage

Auth

Type: HTTP basic authentication

Read the external getting-started article which explains API keys and Sender ID logic.

Getting started: sending an omnimessage

require 'messente_api'

# setup authorization
MessenteApi.configure do |config|
    # Configure HTTP basic authorization: basicAuth
    config.username = '<MESSENTE_API_USERNAME>'
    config.password = '<MESSENTE_API_PASSWORD>'
end

api_instance = MessenteApi::OmnimessageApi.new
omnimessage = MessenteApi::Omnimessage.new
omnimessage.to = '<phone number in e.164 format>'
omnimessage.messages = [
    MessenteApi::SMS.new(
        {
            :sender => "<sender name or phone number in e.164 format>",
            :text => "Hello SMS!"
        }
    ),
    MessenteApi::WhatsApp.new(
        {
            :sender => "<sender name or phone number in e.164 format>",
            :text => MessenteApi::WhatsAppText.new(
                {
                    :body => "Hello from WhatsApp!",
                    :preview_url => false
                }
            )
        }
    ),
    MessenteApi::Viber.new(
        {
            :sender => "<sender name or phone number in e.164 format>",
            :text => "Hello from Viber!"
        }
    )
]

begin
    result = api_instance.send_omnimessage(omnimessage)
rescue MessenteApi::ApiError => e
    puts "Exception when calling send_omnimessage: #{e}"
    puts e.response_body
end

License

Apache 2.0

Terms

https://messente.com/terms-and-conditions

You can’t perform that action at this time.