Smart Messaging on Swisscom Application Cloud

When good old friends decide to join forces, you know great things will happen. Swisscom API and Application Cloud have been brothers in arms since the first hour of the digital journey. With Smart Messaging, the first service went live that leverages the capabilities of our APIs and puts them at your fingertips thanks to the Open Service Broker architecture.

SMS is not dead

This being the first from a whole portfolio of services, we have focused on the concise and well-understood short message service better known as SMS.

Whatsapp and co may have revolutionized the world of messaging, but they rely on smartphones, an active mobile Internet connection and presence of their mobile App. While peer-to-peer communication like Whatsapp may pre-empt these preconditions, Application to Person (A2P) communication cannot rely on them if you want to maximise your reach and in a real-time manner.

Application to Person (A2P) communication

With Smart Messaging enabled and bound to your application, you can do two things.

  • Notify your customers, e.g. about progress in order processing, advertise new product features, broadcast outage notifications, inform your community about upcoming activities, send information on a confidential channel, etc. Reliable, ubiquitous and with zero pre-requisites to your users.
  • Provide two-factor authentication by challenging an SMS token. Your customer logs in with his credentials („what you know“) and receives an SMS with a random token, which s/he enters during the second authentication step („what you have“). Or, SMS token implements the authentication alone: a simple way of authenticating your user without tedious registration forms.

 

How it works

Enabling Smart Messaging is simple. Here’s an overview of the steps.

  • Create a service in your developer console as per the usual, select Smart Messaging
  • The service is in „Pending“ status until you provide your mobile number by clicking „Manage“:
  • We validate your number with an SMS token (the same service which you can activate in your own application later). This number is used as sender for your SMS’s.
  • Proceed with creating a service key as you do with other App Cloud services.

Using this service is easy from then on. Your service key includes a client_id which authenticates your service. Treat this ID confidentially.

The following is an example from our Github sample App of how you can use the service (Node JS).

app.post('/sendsms', function (req, res, next) {
	var client_id = getClientId();

	var options = {
		url: 'https://api.swisscom.com/messaging/sms',
		method: 'POST',
		headers: {
			'Content-Type': 'application/json',
			'client_id': client_id,
			'SCS-Version': '2',
			'SCS-Request-ID': Math.random()
		},
		json: {
			"to": req.body.to,
			"text": req.body.text
		}
	};


	request(options, function (error, response, body) {
		...
	});
})

Please refer to our Github sample App for details.

Upcoming Webinar

We cordially invite you to join our webinar on 16th of November 2017 at 14:00 Swiss time, to see a live demonstration of the instantiation and use of this service and discuss with us on questions and requests you may have. Register today!

What’s next

Smart Messaging is only the beginning. Within the product itself, there’s a wealth of options and features that we aren’t currently exposing, awaiting feedback from our users (you!). And that’s not even mentioning the great plans we have, with respect to for example rich communication services and enterprise-grade features that we’d also like to bring to our developers.

But the application cloud offers a great ecosystem to expose further Swisscom core services to enterprises and developers, enabling the amazing applications we already see being developed today. So stay tuned, watch this channel and let’s keep those amazing applications coming.