Skip to main content
Version: 13.x (Current)

SMS Service

SMS Service allows sending SMS through Twilio or Kaleyra.



The service needs an API Key.

For more information about setting up a Kaleyra account, please refer to the official Kaleyra documentation.


The service needs an API Key to authenticate your requests to Twilio.

This kind of revocable credential can be created in your Twilio console.

Environment variables

The SMS Service accepts the environment variables listed in the following table.

All environment variables starting with TWILIO_ or KALEYRA_ respectively apply only to Twilio or Kaleyra provider.

NameRequiredDefaultMinimum versionDescription
SERVICE_PROVIDERYes-1.0.0The provider used to send the message. Admitted values: twilio, kaleyra (since version 1.2.0).
RATE_LIMIT_MAX_REQUESTSNo1001.1.0Maximum number of requests in a certain time window. It must be greater than zero.
RATE_LIMIT_TIME_WINDOWNo1 minute1.1.0Time window in which the service max number of request is counted. It can be expressed in milliseconds or as a string (in the ms format).
EXPONENTIAL_DELAY_RESET_AFTERNo1201.1.0time window after which the exponential delay in requests to send sms to the same phone number is reset to zero. It is expressed in seconds.
TWILIO_ACCOUNT_SIDIf SERVICE_PROVIDER is twilio-1.0.0The SID of your Twilio Account.
TWILIO_AUTH_TOKENIf SERVICE_PROVIDER is twilio-1.0.0Your Auth Token from Twilio.
TWILIO_EMPTY_BALANCE_CHECKNofalse1.1.0Check Twilio account balance before sending SMS, allowing it only with a positive balance.
KALEYRA_BASE_URLIf SERVICE_PROVIDER is kaleyra-1.2.0Base URL of the Kaleyra API, like
KALEYRA_API_KEYIf SERVICE_PROVIDER is kaleyra-1.2.0API Key of the Kaleyra account.
KALEYRA_SIDIf SERVICE_PROVIDER is kaleyra-1.2.0Security Identifier of the Kaleyra account.
KALEYRA_EMPTY_BALANCE_CHECKNofalse1.1.0Check Kaleyra account balance before sending SMS, allowing it only with a positive balance.