A Java library for easy use of the Swisscom SMS API in Java. The SMS-API of Swisscom is published and documented at the Swisscom Developer Portal.
To use the API with this client you have to register at the Swisscom developer portal and create an API-Key.
<dependency>
<groupId>be.rufer.swisscom.sms</groupId>
<artifactId>api-client</artifactId>
<version>1.0</version>
</dependency>
The following code snippet shows how to use the Swisscom API-Client
import be.rufer.swisscom.sms.api.client.SwisscomSmsSender;
import be.rufer.swisscom.sms.api.domain.CommunicationWrapper;
public class SmsSenderExample
{
public static void main( String[] args )
{
// SENDER_NUMBER and RECEIVER_NUMBER1 in the following format: +41791234567
SwisscomSmsSender smsSender = new SwisscomSmsSender("API_KEY", "SENDER_NUMBER");
CommunicationWrapper response = smsSender.sendSms("MESSAGE", "RECEIVER_NUMBER1");
// Sending a SMS to several receivers
CommunicationWrapper response2 = smsSender.sendSms("MESSAGE", "RECEIVER_NUMBER1", "RECEIVER_NUMBER2");
}
}
For releasing consider the maven central manual