Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

Messente API Library

  • Messente API version: 1.4.0
  • C# package version: 2.1.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 via NuGet Package Manager or .NET CLI.

Package Manager

Install-Package com.Messente.Api -Version 2.1.0

.NET CLI

dotnet add package com.Messente.Api --version 2.1.0

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

NumberLookupApi

  1. Requests info about phone numbers FetchInfo

OmnimessageApi

  1. Cancels a scheduled Omnimessage CancelScheduledMessage
  2. Sends an Omnimessage SendOmnimessage

StatisticsApi

  1. Requests statistics reports for each country CreateStatisticsReport

Auth

Type: HTTP basic authentication

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

Getting started: sending an omnimessage

using System;
using System.Diagnostics;
using System.Collections.Generic;
using com.Messente.Api.Api;
using com.Messente.Api.Client;
using com.Messente.Api.Model;

namespace Example
{
    public class SendOmniMessageExample
    {
        public static void Main()
        {
            // Configure HTTP basic authorization: basicAuth
            Configuration.Default.Username = "<MESSENTE_API_USERNAME>";
            Configuration.Default.Password = "<MESSENTE_API_PASSWORD>";

            List<object> messages = new List<object>();
            var sms = new SMS(sender: "<sender number or name>", text: "Hello SMS!");
            var viber = new Viber(text: "Hello viber!");
            var whatsapp = new WhatsApp(text: new WhatsAppText(body: "Hello WhatsApp!"));
            messages.Add(viber);
            messages.Add(whatsapp);
            messages.Add(sms);

            var apiInstance = new OmnimessageApi();
            var omnimessage = new Omnimessage(to: "<phone_number>", messages: messages);

            try
            {
                // Sends an Omnimessage
                OmniMessageCreateSuccessResponse result = apiInstance.SendOmnimessage(omnimessage);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SendOmnimessage: " + e.Message);

            }

        }
    }
}

License

Apache-2.0

Terms

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