import com.vailsys.persephony.api.PersyClient;
import com.vailsys.persephony.api.PersyException;
public class Example {
// your Persephony account ID
public static final String accountId = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
// your Persephony authentication token
public static final String authToken = "your_auth_token";
// phone number receiving test SMS in format "+1XXXXXXXXXX"
public static final String To = "your_phone_number";
// Persephony phone number in your account associated with sending the test SMS in format "+1XXXXXXXXXX"
public static final String From = "a_persephony_phone_number_in_your_account";
public static void main(String[] args) {
try {
PersyClient client = new PersyClient(accountId, authToken);
client.messages.create(From, To, "Welcome to Persephony!");
}
catch(PersyException pe) {
System.out.println(pe.getMessage());
}
}
}
Update Example used to test that SDK is properly setup: