Function authy::api::user::sms [] [src]

pub fn sms(
    client: &Client,
    id: u32,
    force: bool,
    action: Option<&str>,
    action_message: Option<&str>
) -> Result<(Status, PhoneCall), AuthyError>

Send token to user via SMS.

Once an Authy ID has been generated for a user, you can provide a two-factor stage to a login. If the user downloads and installs the Authy smartphone application, it will generate the codes required. However, for users that don't own a smartphone, Authy allows you to use text messages to send the one time passcode. By default this call will be ignored if the user has downloaded and registered the Authy smartphone application against their phone number. However you can override this behavior.

Custom Actions

You can pass action and action_message (optional) to send a code that is only valid for the given action. This is useful if you require codes to perform different actions on your app. When using this option you have to pass the same action when verifying the code.

Please see the Authy documentation for more details: https://www.twilio.com/docs/api/authy/authy-totp#requesting-sms-codes