Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Swisscom SMS-API-Client

Build Status Coverage Status License Releases Maven Central

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.

How to use

To use the API with this client you have to register at the Swisscom developer portal and create an API-Key.

Maven dependency

<dependency>
    <groupId>be.rufer.swisscom.sms</groupId>
    <artifactId>api-client</artifactId>
    <version>1.0</version>
</dependency>

Example code snippet

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");
    }
}

Release

For releasing consider the maven central manual

About

A Java library for easy use of the swisscom SMS API in Java projects

Topics

Resources

License

Packages

No packages published

Languages