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 Token Server to send SMS messages is by implementing your own (micro) service based on the REST API that the 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 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.

Twilio SMS gateway

The Token Server comes with a Twilio SMS gateway implementation out-of-the-box. When using the Twilio SMS gateway you use Twilio services to actually 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 Token Server to send SMS messages you can set the SMS gateway Docker Compose environment variable to dummySmsGateway. With this sms gateway implementation the Token Server will not send any SMS messages.