Skip to main content

<a id=“SuperOffice_WebApi_Agents_MessagingAgent”></a> Class MessagingAgent

Namespace: SuperOffice.WebApi.Agents
Assembly: SuperOffice.WebApi.dll
SMS and other external messaging systems <p></p> <b>Online Restricted:</b> This agent is not available in Online by default. Access must be requested specifically when app is registered.

Inheritance

objectAgentBaseMessagingAgent

Implements

IMessagingAgent, IAgentBase, IDisposable

Inherited Members

AgentBase._json, AgentBase._binary, AgentBase._config, AgentBase._client, AgentBase._disposeClient, AgentBase.Merge(RequestOptions), AgentBase.BuildRequestFromObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.BuildRequestFromStream(HttpMethod, string, Stream, WebApiOptions, string), AgentBase.BuildRequestFromObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.ParseAuthorization(IAuthorization), AgentBase.CancelRequest(), AgentBase.SendRequestObject(HttpMethod, string, object, WebApiOptions, string), AgentBase.SendRequestObjectWithStream(HttpMethod, string, object, Stream, WebApiOptions, string), AgentBase.SendRequest(HttpRequestMessage, RequestOptions), AgentBase.ThrowOnResponseErrorAsync(HttpRequestMessage, HttpResponseMessage), AgentBase.ParseResponse<T&gt;(HttpResponseMessage), AgentBase.Finally(RequestOptions), AgentBase.Dispose(), AgentBase.Configuration, AgentBase.Client, AgentBase.HasRunningRequest, AgentBase.ClientCancellationTokenSource, AgentBase.ProgressListener, AgentBase.UploadProgressListener, object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()

Examples

<pre><code class=“lang-csharp”>using SuperOffice.WebApi; using SuperOffice.WebApi.Agents; var mySession = new WebApiOptions(“http://example.com/super/api”); mySession.Authorization = new AuthorizationUsernamePassword(“user”, “pass”); using (MessagingAgent agent = new MessagingAgent(mySession)) { // call methods on agent here… }</code></pre>

Constructors

<a id=“SuperOffice_WebApi_Agents_MessagingAgent__ctor_System_Net_Http_HttpClient_”></a> MessagingAgent(HttpClient)

Constructor: SMS and other external messaging systems

Parameters

httpClient HttpClient Use this HTTP client instead of making own HttpClient instance.

<a id=“SuperOffice_WebApi_Agents_MessagingAgent__ctor_SuperOffice_WebApi_WebApiOptions_System_Net_Http_HttpClient_”></a> MessagingAgent(WebApiOptions, HttpClient)

Constructor: SMS and other external messaging systems

Parameters

options WebApiOptions Base URL and authentication values. httpClient HttpClient Optional: Use this HTTP client instead of making a new one.

Methods

<a id=“SuperOffice_WebApi_Agents_MessagingAgent_CreateMessageAsync_SuperOffice_WebApi_Data_IncomingMessage_SuperOffice_WebApi_RequestOptions_”></a> CreateMessageAsync(IncomingMessage, RequestOptions)

Create a new message and insert it in the message queue. (inbox) <p></p> <b>Online Restricted:</b> The Messaging agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

incomingMessage IncomingMessage requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task

<a id=“SuperOffice_WebApi_Agents_MessagingAgent_GetDeliveryStatusAsync_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> GetDeliveryStatusAsync(int[], RequestOptions)

Get delivery status <p></p> <b>Online Restricted:</b> The Messaging agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

messagingIds int[] Array of messaging ids. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<MessageDeliveryStatus[]&gt;

<a id=“SuperOffice_WebApi_Agents_MessagingAgent_GetPluginsAsync_SuperOffice_WebApi_RequestOptions_”></a> GetPluginsAsync(RequestOptions)

<p></p> <b>Online Restricted:</b> The Messaging agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<ProviderInfo[]&gt;

<a id=“SuperOffice_WebApi_Agents_MessagingAgent_SendMessagesAsync_System_String_SuperOffice_WebApi_Data_OutgoingMessage___SuperOffice_WebApi_RequestOptions_”></a> SendMessagesAsync(string, OutgoingMessage[], RequestOptions)

Send an array of messages <p></p> <b>Online Restricted:</b> The Messaging agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

plugin string Name of plugin to use. outgoingMessages OutgoingMessage[] Array of outgoing messages you want to send. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<MessageDeliveryStatus[]&gt; Array of MessageDeliveryStatus. Length of the array is equal to the number of outgoing messages.

<a id=“SuperOffice_WebApi_Agents_MessagingAgent_SendMessagesWithConfigAsync_System_String_SuperOffice_WebApi_Data_OutgoingMessage___SuperOffice_WebApi_Data_StringDictionary_SuperOffice_WebApi_RequestOptions_”></a> SendMessagesWithConfigAsync(string, OutgoingMessage[], StringDictionary, RequestOptions)

Send an array of messages using given config <p></p> <b>Online Restricted:</b> The Messaging agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

plugin string Name of plugin to use. outgoingMessages OutgoingMessage[] Array of outgoing messages you want to send. config StringDictionary Config values used by the plugin. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task<MessageDeliveryStatus[]&gt; Array of MessageDeliveryStatus. Length of the array is equal to the number of outgoing messages.

<a id=“SuperOffice_WebApi_Agents_MessagingAgent_SetDeliveryStatusAsync_System_String_System_String_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> SetDeliveryStatusAsync(string, string, int, string, RequestOptions)

Set or change the delivery status on an outgoing messsage. <p></p> <b>Online Restricted:</b> The Messaging agent is not available in Online by default. Access must be requested specifically when app is registered.

Parameters

plugin string Name of plugin externalMessageId string External message id known to plugin. status int Delivery status statusDescription string String describing delivery status. requestOptions RequestOptions Override language/culture codes on this request.

Returns

Task