Is there any way for sending code by SMS when the user login to the website "OTP", I want my website more security for login, the users have to type Username,password, SMS code.

Thanks for your support,


4 Answers 4


You Can go for Twilio Module

The Twilio module provides integration with the Twilio cloud communication platform 
allowing for your Drupal site to integration Voice and SMS functionality.

What you can do using this module

Ability to store and access TwiML
Rules event to act on incoming SMS message
Rules action to send an SMS message
Rules event to execute TwiML scripts
Hook for incoming SMS messages
Hook for incoming voice calls
User object phone number storage and validation
Uses libraries api to manage the Twilio php library
Support for international texting
Support for MMS
  • Thanks for your response, I use SMS Framework, and my gateway, but now I just need to send code by sms for any login, where any user does not login without correct code. this Future is existing for only registration
    – mabawa
    May 8, 2015 at 7:50

You can try the OTP Verification module.

For module documentation,

Verify your user's email address or mobile number during registration or landing page form submission with One Time Passcode(OTP).

OTP Verification module verifies Email Address/Mobile Number of users by sending verification code(OTP) during registration. It removes the possibility of a user registering with fake Email Address/Mobile Number. This module checks the existence of the Email Address/Mobile Number and the ability of a user to access that Email Address/Mobile Number.


What about using the Google Authenticator module? Many sites use the App to provide two factor authentication (OTP) including Dropbox and Github. I'm not sure on whether that natively falls back to SMS but perhaps it's a good place to start.


Actually here is a Two Factor Authentication framework solution that provides a pluggable API solution with SMS and Authenticator in a companion module. SMS in that module is provided by Twilo

API module https://www.drupal.org/project/tfa

Companion https://www.drupal.org/project/tfa_basic

  • Is there any module use SMS framework module for this? Many Thanks,
    – mabawa
    May 10, 2015 at 7:09
  • Why don't you look at the tfa basic module and wire your own extension to use the framework you want and contribute that back? I'm sure people would be grateful for your work. May 10, 2015 at 9:49

You can try Mobile number module, that I wrote. Works with SMSFramework for sending SMS and TFA for adding second factor authentication to login. It comes with mobile number validation and verification to boot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.