- API version: 1.0.0
- SDK version: 1.0.0
For more information, please visit http://support.winsms.co.za/
The SDK is provided as a guideline to accessing the WinSMS API. The code is provided "as is" without any guarantees. Depending on your environment, the SDK may not work "out-of-the-box", therefore it is expected that you have sufficient technical knowledge and development skills to address any coding issues that may arise from using this SDK.
- .NET 4.0 or later
- Windows Phone 7.1 (Mango)
- RestSharp - 105.1.0 or later
- Json.NET - 7.0.0 or later
- JsonSubTypes - 1.2.0 or later
The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:
Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742
Run the following command to generate the DLL
- [Mac/Linux]
/bin/sh build.sh
- [Windows]
build.bat
Then include the DLL (under the bin
folder) in the C# project, and use the namespaces:
using winsms.Api;
using winsms.Client;
using winsms.Model;
using System;
using System.Diagnostics;
using winsms.Api;
using winsms.Client;
using winsms.Model;
namespace Example
{
public class Example
{
public void main()
{
// Configure API key authorization: APIKeyHeader
Configuration.Default.ApiKey.Add("AUTHORIZATION", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("AUTHORIZATION", "Bearer");
var apiInstance = new CreditsApi();
try
{
// Get your current WinSMS credit balance
CreditBalanceResponse result = apiInstance.GetCreditBalance();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling CreditsApi.GetCreditBalance: " + e.Message );
}
}
}
}
All URIs are relative to https://www.winsms.co.za/api/rest/v1
Class | Method | HTTP request | Description |
---|---|---|---|
CreditsApi | GetCreditBalance | GET /credits/balance | Get your current WinSMS credit balance |
CreditsApi | TransferCredits | POST /credits/transfer | Transfer credits between main and sub accounts. |
ShortcodeApi | GetShortCodeMessages | GET /shortcode/incoming | Get a list of incoming short/long code messages |
SmsApi | DeleteScheduledMessages | POST /sms/scheduled/delete | Delete scheduled SMS messages and refund credits |
SmsApi | GetIncomingMessages | GET /sms/incoming | Get a list of incoming SMS messages |
SmsApi | GetOptoutMessages | GET /sms/incoming/optout | Get a list of incoming opt-out SMS messages |
SmsApi | GetScheduledMessages | GET /sms/scheduled | Get a list of scheduled SMS messages |
SmsApi | SmsSend | POST /sms/outgoing/send | Send SMS messages |
SmsApi | SmsStatus | POST /sms/outgoing/status | Get SMS delivery statuses |
SubaccountsApi | GetSubAccounts | GET /subaccounts | Get a list of all Sub Accounts. |
- Model.CreditBalanceResponse
- Model.CreditTransferDetails
- Model.CreditTransferResponse
- Model.DeleteScheduledResponse
- Model.DeletedMessageStatus
- Model.ErrorDetails
- Model.IncomingMessage
- Model.IncomingMessageResponse
- Model.IncomingOptoutMessage
- Model.MessageRecipientDetails
- Model.MessageRecipientResponse
- Model.MessageStatus
- Model.MessageStatusResponse
- Model.NewMessageDetails
- Model.NewMessageResponse
- Model.OptoutMessageResponse
- Model.ScheduledMessage
- Model.ScheduledMessageResponse
- Model.ShortcodeMessage
- Model.ShortcodeMessageResponse
- Model.SubAccount
- Model.SubAccountsResponse
- Type: API key
- API key parameter name: AUTHORIZATION
- Location: HTTP header