Java SDK
Official Java client for the Instasent Transactional API. Download the JAR, construct an InstasentClient with your api_sms token, and call sendSms.
Thin client over the Transactional HTTP endpoints. For anything outside the methods below, use a plain HTTP client — the Reference documents every endpoint.
Installation
Download the JAR and add it to your project's classpath:
Send an SMS
import com.instasent.InstasentClient;
import java.io.IOException;
import java.util.Map;
public class Main {
public static void main(String[] args) throws IOException {
InstasentClient client = new InstasentClient(System.getenv("INSTASENT_TOKEN"), true);
Map<String, String> response = client.sendSms("My company", "+34666666666", "test message");
System.out.println(response);
}
}Available methods
client.sendSms(sender, to, text, callback);
client.getSms(page, perPage);
client.getSmsById(messageId);Getting help
For help installing or using the library, contact support@instasent.com. Bugs and feature requests belong on the GitHub repository.