Messente API Library
- Messente API version: 2.0.0
- Ruby gem version: 2.5.0
Messente is a global provider of messaging and user verification services. * Send and receive SMS, Viber and WhatsApp messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. 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.
AccountBalanceApi
BlacklistApi
BulkMessagingApi
ContactsApi
DeliveryReportApi
GroupsApi
NumberLookupApi
NumberVerificationApi
OmnimessageApi
PricingApi
StatisticsApi
WhatsAppTemplatesApi
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'
MessenteApi.configure do |config|
config.username = '<MESSENTE_API_USERNAME>'
config.password = '<MESSENTE_API_PASSWORD>'
end
api_instance = MessenteApi::OmnimessageApi.new
omnimessage = MessenteApi::Omnimessage.new
omnimessage.to = '<recipient_phone_number>'
sms = MessenteApi::SMS.new(
sender: "<sender name (optional)>",
text: "Hello SMS!"
)
viber = MessenteApi::Viber.new(
sender: "<sender name (optional)>",
text: "Hello from Viber!"
)
wa_parameters = [
MessenteApi::WhatsAppParameter.new(type: 'text', text: 'hello whatsapp'),
]
wa_component = MessenteApi::WhatsAppComponent.new(type: 'body', parameters: wa_parameters)
wa_lang = MessenteApi::WhatsAppLanguage.new(code: '<language_code>')
wa_template = MessenteApi::WhatsAppTemplate.new(name: '<template_name>', language: wa_lang, components: [wa_component])
whatsapp = MessenteApi::WhatsApp.new(
sender: '<sender name (optional)>',
template: wa_template,
)
omnimessage.messages = [sms, viber, whatsapp]
begin
result = api_instance.send_omnimessage(omnimessage)
puts result
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