// You can paste this into a controller, service, or run in tinker: $apiKey = 'TLhssgOqHWXQkaBMBoZFAfvXEoTlxNasrhTJralNYYGRKyLVUpenWhgaIaQSPG'; // replace with your API key $phone = '2349118205655'; // user phone in international format $senderId = 'Palmigo'; // your approved sender ID $url = 'https://v3.api.termii.com/api/sms/otp/send'; $payload = [ 'api_key' => $apiKey, 'message_type' => 'NUMERIC', 'to' => $phone, 'from' => $senderId, 'channel' => 'generic', 'pin_attempts' => 3, 'pin_time_to_live' => 5, 'pin_length' => 6, 'pin_placeholder' => '< 1234 >', 'message_text' => 'Your Palmigo verification code is < CODE >. Valid for 5 minutes. Do not share this code.' ]; $client = new \GuzzleHttp\Client(); try { $response = $client->post($url, [ 'headers' => ['Content-Type' => 'application/json'], 'json' => $payload ]); $body = json_decode($response->getBody(), true); // Output result for debugging dd($body); // or Log::info($body); } catch (\Exception $e) { dd($e->getMessage()); }