Skip to content
Messente public API libraries merged into one Java 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
gradle/wrapper
src
.gitignore
.openapi-generator-ignore
.travis.yml
README.md
build.gradle
build.sbt
git_push.sh
gradle.properties
gradlew
gradlew.bat
pom.xml
settings.gradle

README.md

Messente API Library

  • Messente API version: 1.0.2
  • Java artifact 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 via Maven, Gradle, Ivy or manual build.

Gradle

compile "com.messente.api:messente-api:1.0.2"

Maven

<dependency>
  <groupId>com.messente.api</groupId>
  <artifactId>messente-api</artifactId>
  <version>1.0.2</version>
  <type>pom</type>
</dependency>

Ivy

<dependency org='com.messente.api' name='messente-api' rev='1.0.2'>
  <artifact name='messente-api' ext='pom' ></artifact>
</dependency>

Manual Build

Generate

mvn clean package

Install

  • target/messente-api-1.0.2.jar
  • target/lib/*.jar

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 addToBlacklist
  2. Deletes a phone number from the blacklist deleteFromBlacklist
  3. Returns all blacklisted phone numbers fetchBlacklist
  4. Checks if a phone number is blacklisted isBlacklisted

ContactsApi

  1. Adds a contact to a group addContactToGroup
  2. Creates a new contact createContact
  3. Deletes a contact deleteContact
  4. Lists a contact fetchContact
  5. Lists groups of a contact fetchContactGroups
  6. Returns all contacts fetchContacts
  7. Removes a contact from a group removeContactFromGroup
  8. Updates a contact updateContact

DeliveryReportApi

  1. Retrieves the delivery report for the Omnimessage retrieveDeliveryReport

GroupsApi

  1. Creates a new group with the provided name createGroup
  2. Deletes a group deleteGroup
  3. Lists a group fetchGroup
  4. Returns all groups fetchGroups
  5. Updates a group with the provided name updateGroup

OmnimessageApi

  1. Cancels a scheduled Omnimessage cancelScheduledMessage
  2. Sends an Omnimessage sendOmnimessage

Auth

Type: HTTP basic authentication

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

Getting started: sending an omnimessage

public class Main {
    public static void main(String[] args) {
        ApiClient apiClient = new ApiClient();

        // Configure HTTP basic authorization: basicAuth
        HttpBasicAuth basicAuth = (HttpBasicAuth) apiClient.getAuthentication("basicAuth");
        basicAuth.setUsername("<MESSENTE_API_USERNAME>");
        basicAuth.setPassword("<MESSENTE_API_PASSWORD>");

        OmnimessageApi apiInstance = new OmnimessageApi(apiClient);
        Omnimessage omnimessage = new Omnimessage(); // Omnimessage | Omnimessage to be sent
        Viber viber = new Viber();
        viber.text("Viber text");
        viber.sender("Messente");
        SMS sms = new SMS();
        sms.text("SMS text");

        WhatsApp whatsApp = new WhatsApp();
        WhatsAppText whatsAppText = new WhatsAppText();
        whatsAppText.body("WhatsApp text");
        whatsApp.text(whatsAppText);

        omnimessage.setMessages(Arrays.<Object>asList(whatsApp, viber, sms));
        omnimessage.setTo("<recipient phone number in e.164 format>");


        try {
            OmniMessageCreateSuccessResponse result = apiInstance.sendOmnimessage(omnimessage);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling sendOmnimessage");
            e.printStackTrace();
        }
    }
}

License

Apache 2.0

Terms

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

You can’t perform that action at this time.