Java
Welcome to the ReSMS java integration guide.
This guide explains how you can quickly and securely send SMS messages using the ReSMS API in your JAVA applications.
Installation
First, install our official ReSMS JAVA SDK:
<dependency>
<groupId>org.resms</groupId>
<artifactId>sdk</artifactId>
<version>1.0.0</version>
</dependency>
Setup
You need to get an API key on ReSMS Dashboard .
Then import the package and create a new instance of the ReSMS
class with your API key.
import resms;
ReSMS client = new ReSMS("re_12345");
or
import resms;
ReSMS client = new ReSMS("re_12345", 10); //timeout in seconds
Quickstart
Here’s a minimal example to send an SMS:
import resms;
ReSMS client = new ReSMS("re_12345");
// Easiest way
SendSmsResponse response1 = client.send("+33123456789", "Hello World!");
// By using SendSmsRequest class
SendSmsRequest request = new SendSmsRequest("+33123456789", "Hello World!");
SendSmsResponse response2 = client.send(request);
Going Further
Need help? Contact our support at contact@resms.dev
Last updated on