Messente's API which allows sending messages via various channels with fallback options.
- .NET Core >=1.0
- .NET Framework >=4.6
- Mono/Xamarin >=vNext
- UWP >=10.0
- FubarCoder.RestSharp.Portable.Core >=4.0.7
- FubarCoder.RestSharp.Portable.HttpClient >=4.0.7
- Newtonsoft.Json >=10.0.3
Generate the DLL using your preferred tool
Then include the DLL (under the bin
folder) in the C# project, and use the namespaces:
using com.Messente.Omnichannel.Api;
using com.Messente.Omnichannel.Client;
using com.Messente.Omnichannel.Model;
using System;
using System.Diagnostics;
using System.Collections.Generic;
using com.Messente.Omnichannel.Api;
using com.Messente.Omnichannel.Client;
using com.Messente.Omnichannel.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 OmnimessageApi.SendOmnimessage: " + e.Message);
}
}
}
}
All URIs are relative to https://api.messente.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
DeliveryReportApi | RetrieveDeliveryReport | GET /omnimessage/{omnimessage_id}/status | Retrieves the delivery report for the Omnimessage |
OmnimessageApi | CancelScheduledMessage | DELETE /omnimessage/{omnimessage_id} | Cancels a scheduled Omnimessage |
OmnimessageApi | SendOmnimessage | POST /omnimessage | Sends an Omnimessage |
- Model.Channel
- Model.DeliveryReportResponse
- Model.DeliveryResult
- Model.Err
- Model.ErrorItem
- Model.ErrorResponse
- Model.Message
- Model.MessageResult
- Model.OmniMessageCreateSuccessResponse
- Model.Omnimessage
- Model.ResponseErrorCode
- Model.ResponseErrorTitle
- Model.SMS
- Model.Status
- Model.Viber
- Model.WhatsApp
- Model.WhatsAppAudio
- Model.WhatsAppDocument
- Model.WhatsAppImage
- Model.WhatsAppText
- Type: HTTP basic authentication