Clockwork SMS API
Documentation
Everything you need to know

VB.NET wrapper

Send SMS from VB.NET using just a few lines of code. Download the project.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Imports Clockwork
Imports System.Net

Module DemoSMS

    Sub Main()
        Try
            Dim api As Clockwork.API = New Clockwork.API("API_KEY_GOES_HERE")
            Dim result As SMSResult = api.Send(New SMS() With {
              .To = "447000000000",
              .Message = "Hello World"
            })

            If (result.Success) Then
                Console.WriteLine("Sent, ID: " + result.ID)
            Else
                Console.WriteLine("Error: " + result.ErrorMessage)
            End If

        Catch ex As APIException
            ' You'll get an API exception for errors
            ' such as wrong username or password
            Console.WriteLine("API Exception: " + ex.Message)
        Catch ex As WebException
            'Web exceptions mean you couldn't reach the Clockwork server
            Console.WriteLine("Web Exception: " + ex.Message)
        Catch ex As ArgumentException
            ' Argument exceptions are thrown for missing parameters,
            ' such as forgetting to set the username
            Console.WriteLine("Argument Exception: " + ex.Message)
        Catch ex As Exception
            ' Something else went wrong, the error message should help
            Console.WriteLine("Unknown Exception: " + ex.Message)
        End Try
    End Sub

End Module

Full documentation can be found in the readme file. If you have any questions get in touch.

Code Wrappers

  • C# wrapper
  • Java wrapper
  • Node.js Wrapper
  • PHP Wrapper
  • Python Wrapper
  • Ruby gem
  • VB.NET wrapper

Email Interface

  • Send SMS via email

HTTP Interface

  • Check your credit via HTTP
  • SMS Delivery Receipts via HTTP
  • Receive SMS via HTTP
  • Send SMS via HTTP

XML Interface

  • Check your credit using XML
  • SMS Delivery Receipts in XML
  • Receive SMS in XML
  • Send SMS using XML

Reference

  • API Error Codes
  • Delivery States
  • GSM Character set