17.2.1.15.1. HTTP SMS Provider¶
- class privacyidea.lib.smsprovider.HttpSMSProvider.HttpSMSProvider(db_smsprovider_object=None, smsgateway=None)[source]¶
Create a new SMS Provider object fom a DB SMS provider object
- Parameters:
db_smsprovider_object – The database object
smsgateway – The SMS gateway object from the database table SMS gateway. The options can be accessed via self.smsgateway.option_dict
- Returns:
An SMS provider object
- check_configuration()[source]¶
This method checks the sanity of the configuration of this provider. If there is a configuration error, than an exception is raised. :return:
- classmethod parameters()[source]¶
Return a dictionary, that describes the parameters and options for the SMS provider. Parameters are required keys to values.
- Returns:
dict
- submit_message(phone, message)[source]¶
send a message to a phone via an http sms gateway
Additional options of an SMS may use
{phone}and{otp}. A structured push payload additionally expands{message}, and an option consisting only of{message}or{otp}preserves the payload as an object.- Parameters:
phone – the phone number
message – the message to submit to the phone
- Returns:
- supports_push_messages = True¶