turkeysms / laravel
TurkeySMS API V4 Official Laravel Package
Requires
- php: >=8.0
- guzzlehttp/guzzle: ^7.0
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
This package is auto-updated.
Last update: 2026-05-10 04:43:20 UTC
README
Integrate TurkeySMS API V4 into your Laravel application seamlessly. This official package provides a clean, elegant syntax for sending SMS, OTP, and managing your TurkeySMS account. Featuring Facade support and Auto-Discovery.
🛠 Installation
You can install the package via composer:
composer require turkeysms/laravel
The package will automatically register its service provider and facade (Auto-Discovery).
Publish Configuration
Publish the config file to customize your settings:
php artisan vendor:publish --provider="TurkeySms\Laravel\TurkeySmsServiceProvider" --tag="config"
⚙️ Configuration
Add your API Key to your .env file:
TURKEYSMS_API_KEY=your_api_key_here TURKEYSMS_DEFAULT_TITLE=SENDER
🚀 Usage
Sending Standard SMS
use TurkeySms; $result = TurkeySms::send([ 'mobile' => '905xxxxxxxxx', 'text' => 'Hello from TurkeySMS Laravel!', 'title' => 'SENDER' ]);
Sending OTP SMS
Ultra-fast delivery for verification codes:
$result = TurkeySms::sendOtp([ 'mobile' => '905xxxxxxxxx', 'lang' => 1, // 0: English, 1: Turkish, 2: Arabic 'digits' => 4 ]);
Advanced OTP (Custom Text)
$result = TurkeySms::sendDetailedOtp([ 'mobile' => '905xxxxxxxxx', 'title' => 'SENDER', 'text' => 'Your verification code is: TS-CODE', 'lang' => 1 ]);
Check Balance
$balance = TurkeySms::getBalance(); // Returns: ["status" => "success", "balance" => "1500 SMS", ...]
🛡 Security
If you discover any security-related issues, please email support@turkeysms.com.tr instead of using the issue tracker.
📄 License
The MIT License (MIT). Please see License File for more information.
© 2026 TurkeySMS Bilişim ve İletişim Hizmetleri Tic. Ltd. Şti.