Giter VIP home page Giter VIP logo

messente-omnichannel-node's Introduction

Messente API Library

  • Messente API version: 2.0.0
  • Python package version: 1.5.0

Messente is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram 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 pip 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

NumberLookupApi

  1. Requests info about phone numbers fetch_info

OmnimessageApi

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

StatisticsApi

  1. Requests statistics reports for each country create_statistics_report

Auth

Type: HTTP basic authentication

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

Getting started: sending an omnimessage

from pprint import pprint
from messente_api import (
    OmnimessageApi,
    Viber,
    SMS,
    Omnimessage,
    Configuration,
    ApiClient,
    WhatsApp,
    WhatsAppText
)
from messente_api.rest import ApiException

# API information from https://dashboard.messente.com/api-settings
configuration = Configuration()
configuration.username = '<MESSENTE_API_USERNAME>'
configuration.password = '<MESSENTE_API_PASSWORD>'

# create an instance of the API class
api_instance = OmnimessageApi(ApiClient(configuration))

whatsapp = WhatsApp(
    sender='<sender name (optional)>',
    text=WhatsAppText(
        body='hello whatsapp'
    )
)

viber = Viber(
    sender='<sender name (optional)>',
    text='hello python',
)

sms = SMS(
    sender='<sender name (optional)>',
    text='hello python',
)

# The order of items in 'messages' specifies the sending order:
# WhatsApp will be attempted first,
# then Viber,
# and SMS as the final fallback
omnimessage = Omnimessage(
    messages=(whatsapp, viber, sms),
    to='<recipient_phone_number>',
)  # Omnimessage | Omnimessage object that is to be sent

try:
    # Sends an Omnimessage
    response = api_instance.send_omnimessage(omnimessage)
    print(
        'Successfully sent Omnimessage with id: %s that consists of the following messages:' % response.omnimessage_id
    )
    for message in response.messages:
        pprint(message)
except ApiException as exception:
    print('Exception when sending an omnimessage: %s\n' % exception)

License

Apache-2.0

Terms

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

messente-omnichannel-node's People

Contributors

ukuloskit avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ertprs

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.