Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

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

License

Notifications You must be signed in to change notification settings

rufer7/swisscom-sms-api-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


⚠️This repository has been archived and is no longer maintained⚠️


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

Stars

Watchers

Forks

Packages

No packages published

Languages