Start texting with a few lines of code
Our easy-to-use SMS API and in-depth documentation make it quick and easy to build SMS into your platform.
With our SMS API, you can:
- Immediately alert your customers of updates
- Improve conversions with reminders
- Protect customers by confirming recent activity
import com.telesign.MessagingClient;
import com.telesign.RestClient;
public class HelloTelesign {
public static void main(String[] args) {
String customerId = "CCF97564-C760-4D67-8D39-877D23D14DD8";
String apiKey = "*********************************";
String phoneNumber = "14085298304";
String message = "You're scheduled for a dentist appointment at 2:30PM.";
String messageType = "ARN";
try {
MessagingClient messagingClient = new MessagingClient(customerId, apiKey);
RestClient.TelesignResponse telesignResponse = messagingClient.message(phoneNumber, message, messageType, null);
System.out.println("Your reference id is: "+telesignResponse.json.get("reference_id"));
} catch (Exception e) {
e.printStackTrace();
}
}
}