View Source ExMsg91 (ex_msg91 v0.2.0)
Documentation for ExMsg91
Elixir library for MSG91.
https://msg91.com/
Link to this section Summary
Functions
Method to send SMS to a phone number.
Link to this section Functions
Link to this function
send_sms(template_id, phone_number, country_code, variables \\ %{})
View SourceMethod to send SMS to a phone number.
Returns
{200, %{"message" => "33667a74764c323230353034", "type" => "success"}}
{418, %{"message" => "IP not whitelisted", "type" => "unauthorised"}}
examples
Examples
ExMsg91.send_sms("123123", "1234567890", "91", %{"var1" => "123456"})
{200, %{"message" => "33667a74764c323230353034", "type" => "success"}}
Parameters
send_sms(template_id, phone_number, country_code, variables)
1) `template_id` - Template ID of SMS template in Msg91
2) `phone_number` - Phone number without country code
3) `country_code` - Country code without + sign (E.g. For India use 91)
4) `variable` - Map of variables present in template.