The API transport has been broken for some time now. It would be quicker to write your own custom transport based off the Api.php transport. Here is how you can get started.
Location of alert transports: librenms/LibreNMS/Alert/Transport at master · librenms/librenms · GitHub
How to create a new transport: Creating Transports - LibreNMS Docs
My very crude workaround is to leave the options empty and hard-code the body using object variables. In your case, I would replace the line 40 with this:
$msg = $obj[‘msg’];
$body = sprintf(’
{
“UserName”:“MYUSERKEY”,
“Password”:“MYAPIPASSWORD”,
“Recipients”:[“+10000000000”,“+10000000001”],
“Originator”:“LSTAFFNMS”,
“MessageText”:“%s”
}
', $msg);