Hello,
I'm trying to make the same request as this one, but with a CHANGE or FUNCTION node, and I can't get it... the server responds that it doesn't receive the USERNAME or the LEVEL...
NODEJS example:
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://http-api.d7networks.com/send?username=xxxxxx&password=xxxxxx&dlr-method=POST
&dlr-url=https://4ba60af1.ngrok.io/receive&dlr=yes&dlr-level=3&from=smsinfo
&content=This is the sample content sent to test &to=3333333',
'headers': {
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
I have tried with msg.payload.dlr with msg.dlr and nothing...
This is my Change node:
SET msg.dlr-method = POST
SET msg.dlr-url = https://4ba60af1.ngrok.io/receive
SET msg.dlr-level = 3
SET msg.dlr = YES
SET msg.payload.username = (I also tried without payload: msg.username)
SET msg.pauload.password = (I also tried without payload)
SET msg.payload.from = (I also tried without payload)
SET msg.payload.to = (I also tried without payload)
SET msg.payload.content = (I also tried without payload)
No success so far...
If I program it in an HTTP Request Node with POST with this string:
https://http-api.d7networks.com/send?username=xxxxxxx&password=xxxxxxx&dlr-url=https://4ba60af1.ngrok.io/receive&dlr=yes&dlr-level=3&from=smsinfo&content=This is the sample content sent to test&to =33333333
It works.
What I need is that these input parameters can be loaded independently: CONTENT, TO, FROM, USERNAME, PASSWORD, etc.
Can you help me (I'm learning this wonderful tool called Node-Red ![]()