Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

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

README.md

IO.Swagger - the C# library for the The SMS Works API

The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.

This C# SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.4.0
  • SDK version: 1.0.5
  • Build package: io.swagger.codegen.v3.generators.dotnet.CSharpClientCodegen

Frameworks supported

  • .NET 4.0 or later

Dependencies

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

Installation

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 IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

Getting Started

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class Example
    {
        public void main()
        {
            var apiInstance = new AuthApi();
            var customerid = customerid_example;  // string | Utility method. Please generate your API key by following the instructions on your account page at https://thesmsworks.co.uk/user/login

            try
            {
                ApiKeyResponse result = apiInstance.KeySecret(customerid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AuthApi.KeySecret: " + e.Message );
            }
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api.thesmsworks.co.uk/v1

Class Method HTTP request Description
AuthApi KeySecret GET /auth/getApiKey
AuthApi Login POST /auth/token
BatchMessagesApi CancelScheduledBatchJob DELETE /batches/schedule/{batchid}
BatchMessagesApi GetBatchById GET /batch/{batchid}
BatchMessagesApi ScheduleBatch POST /batch/schedule
BatchMessagesApi SendBatch POST /batch/send
CreditsApi Credits GET /credits/balance
MessagesApi CancelScheduledJob DELETE /messages/schedule/{messageid}
MessagesApi GetFailedMessages POST /messages/failed
MessagesApi GetInboxMessages POST /messages/inbox
MessagesApi GetMessageById GET /messages/{messageid}
MessagesApi GetMessages POST /messages
MessagesApi ScheduleMessage POST /message/schedule
MessagesApi SendFlashMessage POST /message/flash
MessagesApi SendMessage POST /message/send
UtilsApi GetError GET /utils/errors/{errorcode}
UtilsApi Test GET /utils/test

Documentation for Models

Documentation for Authorization

JWT

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

About

C# client SDK for The SMS Works API

Resources

Releases

No releases published

Packages

No packages published

Languages