Laravel SMS Luosimao Service Fails to Send SMS Due to HTTP/HTTPS URL Mismatch
When using the laravel-sms extension with Luosimao, SMS sending fails because the package uses an HTTPS endpoint while the official documentation specifies HTTP, and correcting the URL in the LuosimaoAgent.php file resolves the issue.
The article describes a problem encountered while using the laravel-sms extension to send messages through the Luosimao service: the API call returns a failure response.
The returned JSON payload looks like this:
[
{
"driver": "Luosimao",
"time": {
"started_at": "0.12135700 1488351377",
"finished_at": "0.15184700 1488351377"
},
"success": false,
"result": {
"info": false,
"code": 0
}
}
]Investigation revealed that the cause is the URL defined in the package file vendor/toplan/phpsms/src/phpsms/agents/LuosimaoAgent.php , which uses an HTTPS address, whereas the official Luosimao documentation provides an HTTP endpoint.
Changing the URL from HTTPS to HTTP in the mentioned file fixes the SMS sending failure.
The original article includes a link to the full write‑up for further details.
php中文网 Courses
php中文网's platform for the latest courses and technical articles, helping PHP learners advance quickly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.