Closed KevinCasoco closed 7 months ago
// sample code hope it works
public function sendSMS(Request $request) { $apiKey = env('ITEXMO_API_KEY'); $apiSecret = env('ITEXMO_API_SECRET');
$to = $request->input('to'); // Assuming you're passing the recipient's phone number dynamically $message = $request->input('message'); $response = Http::post('https://www.itexmo.com/php_api/api.php', [ '1' => '09191234567', // Your iTexMo account number '2' => $apiKey, // Your iTexMo API Key '3' => $message, '4' => $to, // Dynamic recipient's phone number ]); // Check the response status if ($response->successful()) { // Handle successful response return response()->json(['success' => true, 'message' => 'SMS sent successfully']); } else { // Handle failure $error_message = $response->body(); return response()->json(['success' => false, 'error' => $error_message], 500); }
}
need valid id to verify the accounts
https://app.philsms.com/account
// sample code hope it works
public function sendSMS(Request $request) { $apiKey = env('ITEXMO_API_KEY'); $apiSecret = env('ITEXMO_API_SECRET');
}
need valid id to verify the accounts