Skip to content
Messente public API libraries merged into one C# 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
src/com.Messente.Api
.gitignore
.openapi-generator-ignore
README.md
com.Messente.Api.sln
git_push.sh

README.md

Messente API Library

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

Package Manager

Install-Package com.Messente.Api -Version 1.0.2

.NET CLI

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

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

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

You can’t perform that action at this time.