API Transport - aspsms error

Good morning,
I am having an issue getting an API transport for aspsms to work. I have followed the directions listed here: https://docs.librenms.org/Alerting/Transports/#api, however, I get a Server error when I attempt to test the transport, returned “Request format is invalid: .”

My configuration is as follows:
API Method: POST
API URL: https://soap.aspsms.com/aspsmsx.asmx/SimpleTextSMS
Options: UserName=MYUSERKEY
Password=MYAPIPASSWORD
Recipients=["+10000000000","+10000000001"]
Originator=‘LSTAFFNMS’
MessageText={{ $msg }}
headers:
body:
Auth Username:
Auth Password: ••••••••

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: https://github.com/librenms/librenms/tree/master/LibreNMS/Alert/Transport

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);

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.