Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Msg91 Laravel

Msg91 Laravel Laravel Package

kaydee123/msg91-laravel

Laravel integration for MSG91 SMS and OTP services. Send single/bulk SMS, template-based messages, OTP send/verify/resend (text/voice), and DLT-ready India compliance. Includes auto-discovery service provider, facade, helpers, and publishable config.

View on GitHub
Deep Wiki
Context7

Laravel integration for MSG91 SMS and OTP services

Frequently asked questions about Msg91 Laravel
How do I install and configure this package for Laravel?
Run `composer require kaydee123/msg91-laravel` to install. Publish the config file with `php artisan vendor:publish --tag=msg91-config`, then add your MSG91 auth key and base URL to `.env`. The package auto-registers via Laravel’s auto-discovery.
Does this package support Laravel’s queue system for bulk SMS/OTP?
No, the package doesn’t natively support queues. For high-volume use, manually dispatch SMS/OTP jobs to Laravel’s queue system using `dispatch()` or `dispatchSync()`. The underlying `kaydee123/msg91-php` library handles individual requests.
Can I mock MSG91 responses for unit testing?
The package doesn’t include built-in mocking, but you can stub the `Msg91Client` dependency in tests using Laravel’s `Mockery` or `partialMock`. Override the HTTP client in the `Msg91ServiceProvider` for testing.
How does this handle MSG91’s DLT compliance for India?
The package abstracts DLT compliance via template-based SMS (required for India). Ensure your MSG91 template is DLT-approved. The facade’s `template()` method enforces this structure, reducing manual compliance errors.
What Laravel versions are officially supported?
The package supports Laravel 8.x through 12.x, leveraging auto-discovery and Facades. It’s compatible with PHP 8.0–8.5, using modern features like named arguments without cutting-edge syntax.
How do I handle webhooks for SMS delivery receipts?
MSG91 supports delivery receipts via webhooks, but this package doesn’t include built-in webhook handling. Manually configure MSG91’s webhook endpoint in their dashboard, then validate and process incoming requests in a Laravel route or queue job.
Is there a fallback if MSG91’s API fails or throttles requests?
The package claims ‘comprehensive error handling,’ but specifics aren’t documented. For retries, implement Laravel’s `retry()` helper or use a queue with exponential backoff. Monitor failures via Laravel’s logging.
Can I use this for multi-tenant apps with separate MSG91 keys?
The package doesn’t natively support multi-tenancy. Override the `Msg91ServiceProvider` to dynamically load config per tenant (e.g., via middleware) or use environment-specific `.env` files for each tenant’s MSG91 credentials.
What if I need to switch from MSG91 to another provider later?
Tight coupling to MSG91’s API may complicate provider switches. Abstract the HTTP client layer in your app (e.g., via an interface) to isolate the package. Consider wrapping the facade in a service class for easier future migration.
Are there any known issues with high-volume OTP sending?
No async or queue support is documented, so high-volume OTPs may hit rate limits. Use Laravel’s queues to batch requests or implement manual retry logic. Monitor MSG91’s API docs for throttling limits.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
babenkoivan/elastic-client
innmind/static-analysis
innmind/coding-standard
datacore/hub-sdk
alengo/sulu-http-cache-bundle
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
imbo/imbo-coding-standard
visualbuilder/filament-lottie
servicioslineaonce/starter-kit
atomcoder/laravel-reorderable
irajul/filament-shadcn-theme
agtp/agtp-php
agtp/mod-php
centraldesktop/protobuf-php