Categories
BT Java Web21C

BT’s Java SDK

As I mentioned recently, I now work in the Web21C SDK team. The SDK provides a simple API for programmatically accessing various web services that BT provides, including SMS, conference calls and location services.

The SDK is in public beta, and is currently free (with daily usage limits). Up to now it’s only been available for those crazy .NET folks, but the next release (on Monday, all being well) will extend that to Java, PHP and Python. Rumour has it that Ruby’s in the works too.

I’ve been having a play with the Java version – here’s a sneak preview…

There are a few steps to get set up. First you need to create an account on the website. You then need to download and run a Java application to register your application and create a certificate to identify you to the underlying services. Then there are a few JARs to put in your classpath, a properties file to update with your username, password and certificate filename, and you’re ready to go.

For example, this is all you need to write to send a text message:

package com.kerrybuckley.sdkdemo;

import com.bt.sdk.sms.Messaging;
import com.bt.sdk.sms.SmsMessage;

public class SmsDemo {
    public static void main(String[] args) {
        Messaging smsService = new Messaging();
        SmsMessage message = new SmsMessage();
        message.addRecipient("tel:+447700900123");
        message.setSubject("Testing...");
        message.setMessageText("Hello world, from the Web21C SDK");
        smsService.send(message);
    }
}

Pretty self-explanatory, and just to prove it works:

SMS Message

[tags]web21c, bt, sdk[/tags]

4 replies on “BT’s Java SDK”

Yes, Messaging#send() is overloaded.

What DE is getting at is that instead of this:

Messaging smsService = new Messaging();
SmsMessage message = new SmsMessage();
message.addRecipient("tel:+447700900123");
message.setSubject("Testing...");
message.setMessageText("Hello world, from the Web21C SDK");
smsService.send(message);

I could have just used a convenience method:

Messaging smsService = new Messaging();
smsService.send("tel:+447700900123",
        "Hello world, from the Web21C SDK",
        "Testing...");

Holy Crap!! BT announce Web API…

British Telecom have announced an API, called Web21C (catchy!) that grants you access to some of their network services, SMS, VOICE CALLS!! and, well pretty much every service BT offer. If they don’t get it all tangled in the usual BT beurocracy,…

Leave a Reply