Configure SMS gateway

This section describes how to configure an SMS gateway for the Onegini Token Server. Since we have different options of SMS gateway implementations you need to make a choice which one suits you best. The different options are described below.

REST-based SMS gateway

The most flexible way to allow the Onegini Token Server to send SMS messages is by implementing your own (micro) service based on the REST API that the Onegini Token Server invokes. This service can either be a small component that translates our API to a vendor specific API or it can be a middleware layer which already has access to a generic message gateway.

The REST API that the Onegini Token Server uses in case the REST SMS gateway is activated is described in the API specification.

If you want to use the REST SMS gateway set the SMS gateway Docker Compose environment variable to restSmsGateway and set additional Docker Compose environment variables for the REST SMS gateway.

CM SMS gateway

CM.com is one of the out-of-the-box SMS gateway implementations. It uses CM.com's services to send SMS. In order to enable the CM SMS Gateway you need to set the following environment variable TOKEN_SERVER_ENGINE_CUSTOM_HOOKS_SMS_GATEWAY to cmSmsGateway. Additionally, you need to specify your CM product token in the Docker Compose environment variables specified here.

Twilio SMS gateway

The Onegini Token Server comes with a Twilio SMS gateway implementation out-of-the-box. It uses Twilio' services to send the SMS messages. In order to enable the Twilio SMS Gateway you need to set the following Docker Compose environment variable TOKEN_SERVER_ENGINE_CUSTOM_HOOKS_SMS_GATEWAY to twilioSmsGateway. Additionally, you need to specify your Twilio API credentials in the Docker Compose environment variables specified here.

Dummy SMS gateway

If you do not need the Onegini Token Server to send SMS messages you can set the SMS gateway Docker Compose environment variable to dummySmsGateway. With this sms gateway implementation the Onegini Token Server will not send any SMS messages.