kwtsms
SMS gateway integration with kwtsms.com for Drupal 10.3+ and 11. Adds OTP login, two-factor authentication, password reset via SMS, user notifications, and Commerce order alerts through the kwtSMS API.
Features
Authentication
- OTP login: SMS as primary login or second factor (2FA), configurable per role
- Password reset via SMS: SMS only, Email + SMS, or Email only
- Rate limiting per phone and IP, lockout after failed attempts
Notifications
- User registration SMS to customers and admins
- Commerce: order placed, status updates, payment confirmations
- Commerce: low stock alerts, shipping updates, abandoned cart reminders
Admin UI (7 tabs)
- Dashboard: status overview, SMS stats, 30-day volume chart
- Settings: global on/off, test mode, country code, sender ID, OTP/2FA config
- Gateway: API login/logout, balance, sender IDs, coverage, test SMS
- Templates: multilingual EN/AR message templates with Drupal Token support
- Integrations: Commerce event toggles
- Logs: filterable SMS log with CSV export
- Help: setup guide and support links
Developer
- Events for module integration: kwtsms.otp_request and kwtsms.sms_send
- SMS Framework v2 gateway plugin (bridge submodule)
- Phone normalization with Arabic/Hindi digit support
- Message cleaning: strips emoji, HTML, hidden Unicode
- Bulk sending with 200/batch and ERR013 backoff
- Log retention policy with configurable days
Post-Installation
Navigate to Admin > Configuration > kwtSMS (/admin/config/kwtsms):
- Gateway tab: Enter your kwtSMS API username and password, click Login
- Settings tab: Select your sender ID and default country code, enable SMS sending
- Templates tab: Customize message text for each notification type (English and Arabic)
- Settings > Authentication: Configure OTP login mode and password reset mode
For Commerce notifications, enable the kwtsms_commerce submodule and configure toggles on the Integrations tab.
Additional Requirements
- A kwtSMS.com account with API access
- PHP 8.2+
Recommended modules/libraries
- Drupal Commerce: Enable kwtsms_commerce submodule for order SMS notifications
- SMS Framework: Enable kwtsms_smsframework bridge to use kwtSMS as an SMS Framework gateway
- Token: Adds a token browser UI for SMS template editing
Similar projects
- SMS Framework: Generic SMS gateway abstraction. kwtSMS provides a dedicated, opinionated integration with built-in OTP, 2FA, templates, and Commerce support out of the box. A bridge submodule is included for SMS Framework interoperability.
- TFA: General two-factor authentication. kwtSMS provides SMS-specific 2FA with phone normalization, rate limiting, and anti-enumeration built in.
Supporting this Module
- Support portal: kwtsms.com/support
- FAQ: kwtsms.com/faq