Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/messente/messente-api-java
Messente API library: https://bintray.com/messente/messente-api/messente-api
https://github.com/messente/messente-api-java
number-lookup omnichannel phonebook statistics
Last synced: 25 days ago
JSON representation
Messente API library: https://bintray.com/messente/messente-api/messente-api
- Host: GitHub
- URL: https://github.com/messente/messente-api-java
- Owner: messente
- Created: 2019-03-01T10:25:29.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-16T14:56:47.000Z (3 months ago)
- Last Synced: 2024-09-17T15:16:48.170Z (3 months ago)
- Topics: number-lookup, omnichannel, phonebook, statistics
- Language: Java
- Homepage:
- Size: 771 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Messente API Library
- Messente API version: 2.0.0
- Java artifact version: 4.3.0[Messente](https://messente.com) 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](https://messente.com/documentation) 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
```groovy
dependencies {
implementation 'com.messente.api:messente-api:4.3.0'
}
```### Maven
```xml
com.messente.api
messente-api
4.3.0```
### Ivy
```xml
```
### Manual Build
Generate
```shell
mvn clean package
```Install
- `target/messente-api-4.3.0.jar`
- `target/lib/*.jar`## Features
Messente API has the following features:
- Omnichannel ([external docs](https://messente.com/documentation/omnichannel-api)),
- Phonebook ([external docs](https://messente.com/documentation/phonebook-api)).Messente API Library provides the operations described below to access the features.
### BlacklistApi
1. Adds a phone number to the blacklist [`addToBlacklist`](docs/BlacklistApi.md#addtoblacklist)
1. Deletes a phone number from the blacklist [`deleteFromBlacklist`](docs/BlacklistApi.md#deletefromblacklist)
1. Returns all blacklisted phone numbers [`fetchBlacklist`](docs/BlacklistApi.md#fetchblacklist)
1. Checks if a phone number is blacklisted [`isBlacklisted`](docs/BlacklistApi.md#isblacklisted)### BulkMessagingApi
1. Sends a bulk Omnimessage [`sendBulkOmnimessage`](docs/BulkMessagingApi.md#sendbulkomnimessage)
### ContactsApi
1. Adds a contact to a group [`addContactToGroup`](docs/ContactsApi.md#addcontacttogroup)
1. Creates a new contact [`createContact`](docs/ContactsApi.md#createcontact)
1. Deletes a contact [`deleteContact`](docs/ContactsApi.md#deletecontact)
1. Lists a contact [`fetchContact`](docs/ContactsApi.md#fetchcontact)
1. Lists groups of a contact [`fetchContactGroups`](docs/ContactsApi.md#fetchcontactgroups)
1. Returns all contacts [`fetchContacts`](docs/ContactsApi.md#fetchcontacts)
1. Removes a contact from a group [`removeContactFromGroup`](docs/ContactsApi.md#removecontactfromgroup)
1. Updates a contact [`updateContact`](docs/ContactsApi.md#updatecontact)### DeliveryReportApi
1. Retrieves the delivery report for the Omnimessage [`retrieveDeliveryReport`](docs/DeliveryReportApi.md#retrievedeliveryreport)
### GroupsApi
1. Creates a new group with the provided name [`createGroup`](docs/GroupsApi.md#creategroup)
1. Deletes a group [`deleteGroup`](docs/GroupsApi.md#deletegroup)
1. Lists a group [`fetchGroup`](docs/GroupsApi.md#fetchgroup)
1. Returns all groups [`fetchGroups`](docs/GroupsApi.md#fetchgroups)
1. Updates a group with the provided name [`updateGroup`](docs/GroupsApi.md#updategroup)### NumberLookupApi
1. Requests info about phone numbers [`fetchInfo`](docs/NumberLookupApi.md#fetchinfo)
### OmnimessageApi
1. Cancels a scheduled Omnimessage [`cancelScheduledMessage`](docs/OmnimessageApi.md#cancelscheduledmessage)
1. Sends an Omnimessage [`sendOmnimessage`](docs/OmnimessageApi.md#sendomnimessage)### StatisticsApi
1. Requests statistics reports for each country [`createStatisticsReport`](docs/StatisticsApi.md#createstatisticsreport)
## Auth
**Type**: HTTP basic authentication
Read the [external getting-started article](https://messente.com/documentation/getting-started) which explains API keys and Sender ID logic.
## Getting started: sending an omnimessage
```java
import com.messente.ApiClient;
import com.messente.ApiException;
import com.messente.api.*;
import com.messente.auth.HttpBasicAuth;import java.util.Arrays;
import java.util.List;// repositories { mavenCentral() }
// dependencies { implementation 'com.messente.api:messente-api' }public class Main {
public static void main(String[] args) {
ApiClient apiClient = new ApiClient();
OmnimessageApi apiInstance = new OmnimessageApi(apiClient);HttpBasicAuth basicAuth = (HttpBasicAuth) apiClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR_MESSENTE_API_USERNAME");
basicAuth.setPassword("YOUR_MESSENTE_API_PASSWORD");Viber viber = new Viber();
viber.text("hello viber");
viber.sender("");
OmnimessageMessagesInner viberOmnimessageInner = new OmnimessageMessagesInner(viber);
viberOmnimessageInner.setActualInstance(viber);SMS sms = new SMS();
sms.text("hello sms");
sms.sender("");
OmnimessageMessagesInner smsOmnimessageInner = new OmnimessageMessagesInner(sms);
smsOmnimessageInner.setActualInstance(sms);WhatsAppParameter whatsAppParameter = new WhatsAppParameter();
whatsAppParameter.type("text");
whatsAppParameter.text("hello whatsapp");WhatsAppComponent whatsAppComponent = new WhatsAppComponent();
whatsAppComponent.type("body");
whatsAppComponent.setParameters(List.of(whatsAppParameter));WhatsAppTemplate whatsAppTemplate = new WhatsAppTemplate();
whatsAppTemplate.name("");
whatsAppTemplate.language(new WhatsAppLanguage().code(""));
whatsAppTemplate.setComponents(List.of(whatsAppComponent));WhatsApp whatsApp = new WhatsApp();
whatsApp.sender("");
whatsApp.template(whatsAppTemplate);OmnimessageMessagesInner whatsAppOmnimessageInner = new OmnimessageMessagesInner(whatsApp);
whatsAppOmnimessageInner.setActualInstance(whatsApp);Omnimessage omnimessage = new Omnimessage();
omnimessage.setMessages(
Arrays.asList(
smsOmnimessageInner,
viberOmnimessageInner,
whatsAppOmnimessageInner
)
);
omnimessage.setTo("");try {
OmniMessageCreateSuccessResponse result = apiInstance.sendOmnimessage(omnimessage);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling sendOmnimessage");
System.err.println(e.getResponseBody());
}
}
}```
## License
[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
## Terms
[https://messente.com/terms-and-conditions](https://messente.com/terms-and-conditions)