API

Perl

We offer code samples to make it easy for you to plug in SMS functionality into your applications.Download our SDK that contains sample projects in many languages or go straight to the language you need with our code samples. Code Sample #!/usr/bin/perl -w$file=”cgi-lib”;do $file || die “Fatal Error: Can’t load cgi library – $file\n”;&ReadParse;use CGI qw(:all);use LWP::UserAgent;$ua …

Perl Read More »

VB.NET

We offer code samples to make it easy for you to plug in SMS functionality into your applications. Download our SDK that contains sample projects in many languages or go straight to the language you need with our code samples. Code Sample Public Class MessageDim postURL As String = “http://www.2sms.com/xml/xml.jsp” Dim username As StringDim password As StringSub …

VB.NET Read More »

VBA

We offer code samples to make it easy for you to plug in SMS functionality into your applications. Download our SDK that contains sample projects in many languages or go straight to the language you need with our code samples. Code Sample Sub test()     Dim xmlstring As String     Username = “user@mailaddress.com”    Password = “yourpass”    Message …

VBA Read More »

Python

We offer code samples to make it easy for you to plug in SMS functionality into your applications. Download our SDK that contains sample projects in many languages or go straight to the language you need with our code samples. Code Sample #!/usr/bin/env python import httplib def sendSMS(username, password,destination, message):        body = “<?xml version=\”1.0\” encoding=\”UTF-8\” ?>”+\               “<Request …

Python Read More »

PHP

We offer code samples to make it easy for you to plug in SMS functionality into your applications. Download our SDK that contains sample projects in many languages or go straight to the language you need with our code samples. Code Sample $user = ‘user@company.com’;$pass = ‘myPassword’; $text = substr($HTTP_POST_VARS[‘text’], 0, 160); $mobnum = $HTTP_POST_VARS[‘mobnum’]; $result = …

PHP Read More »

Java

We offer code samples to make it easy for you to plug in SMS functionality into your applications.Download our SDK that contains sample projects in many languages or go straight to the language you need with our code samples. Code Sample package com.twoSms; import java.io.OutputStreamWriter;import java.net.URL;import java.net.URLConnection; import javax.xml.parsers.DocumentBuilder;import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; public class SmsJava{    …

Java Read More »

C#

We offer code samples to make it easy for you to plug in SMS functionality into your applications.Download our SDK that contains sample projects in many languages or go straight to the language you need with our code samples. Code Sample private string formXml(string username, string password, string destination, string message){ // create xml stringstring …

C# Read More »

Standard Reporting

Standard Reporting is requesting a succession of XML reports for yourself using the ‘LoggedReport’ method of our XML schema (schema code 0310). Of course, many users will simply choose to request XML reports from 2sms at less frequent intervals and lower their reporting costs this way. This is a perfectly sensible approach to the problem, …

Standard Reporting Read More »

Status Updates

Status Updates is a service that 2sms provides that allows you to monitor the progress of your messages through the SMS network. Prerequisite You have registered to the 2sms system and have a valid account with message credits. Receiver page URL provided to 2sms for HTTP POST. Click here for an example of HTTP POST. …

Status Updates Read More »

SNPP

The 2sms SNPP Paging solution allows you to send pager messages to 2sms, which will be converted to SMS Text Messages and delivered to any mobile devices. Prerequisites An existing SNPP platformYou have registered to the 2sms system and have a valid account with message credits. Connection Information SNPP Server Host Name: snpp.2sms.comPort Number: 444 …

SNPP Read More »

Scroll to Top