SMS Provider

The following SMS providers are know to privacyIDEA

SMSProvider is the base class for submitting SMS. It provides 3 different imlementations:

  • HTTP: submitting SMS via an HTTP gateway of an SMS provider
  • SMTP: submitting SMS via an SMTP gateway of an SMS provider
  • Sipgate: submitting SMS via Sipgate service Base Class

class privacyidea.lib.smsprovider.SMSProvider.ISMSProvider(db_smsprovider_object=None, smsgateway=None)[source]

the SMS Provider Interface - BaseClass


Load the configuration dictionary

Parameters:config_dict (dict) – The conifugration of the SMS provider
classmethod parameters()[source]

Return a dictionary, that describes the parameters and options for the SMS provider. Parameters are required keys to values with defined keys, while options can be any combination.

Each option is the key to another dict, that describes this option, if it is required, a description and which values it can take. The values are optional.

Additional options can not be named in advance. E.g. some provider specific HTTP parameters of HTTP gateways are options. The HTTP parameter for the SMS text could be “text” at one provider and “sms” at another one.

The options can be fixed values or also take the tags {otp}, {user}, {phone}.

submit_message(phone, message)[source]

Sends the SMS. It should return a bool indicating if the SMS was sent successfully.

In case of SMS send fail, an Exception should be raised. :return: Success :rtype: bool