0

i try use https://rpinotify.it/invio-di-testo.html i want send message with http post but i can't, see images

i use Node-Red to fred.sensetecnic, i try use json, strings... i can't undestrand, can you help me?

3/7/2018, 08:43:15node: 9ee1f8ea.e1c5b8
msg.payload : Object
object
text: "testo"
3/7/2018, 08:43:15node: 9ee1f8ea.e1c5b8
msg.payload : Object
object
info: object
datetime: "2018-07-03 06:43:15"
ip: "54.149.86.44, 108.162.246.239"
message: "'text' or 'img' POST parameter are required"
response: 400

enter link description here

enter link description here

enter link description here

[
    {
        "id": "e6ce432b.5361",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": ""
    },
    {
        "id": "1b6aa9ad.127af6",
        "type": "inject",
        "z": "e6ce432b.5361",
        "name": "",
        "topic": "",
        "payload": "{\"text\":\"testo\"}",
        "payloadType": "json",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 130,
        "y": 420,
        "wires": [
            [
                "18f17e07.1a0c42",
                "9ee1f8ea.e1c5b8"
            ]
        ]
    },
    {
        "id": "18f17e07.1a0c42",
        "type": "http request",
        "z": "e6ce432b.5361",
        "name": "",
        "method": "POST",
        "ret": "obj",
        "url": "https://api.rpinotify.it/message/xxx__secret_key__xxx/",
        "tls": "",
        "x": 370,
        "y": 480,
        "wires": [
            [
                "9ee1f8ea.e1c5b8"
            ]
        ]
    },
    {
        "id": "9ee1f8ea.e1c5b8",
        "type": "debug",
        "z": "e6ce432b.5361",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "x": 550,
        "y": 380,
        "wires": []
    }
]
hardillb
  • 54,545
  • 11
  • 67
  • 105
  • What images? Please update your post with a screen capture of the debug sidebar, showing your payload expanded so we can see the structure of the data you are sending. It would also help to know what node you are trying to use -- you mentioned "http post", but the RpiNotify site says it uses telegram. – SteveR Jul 02 '18 at 17:12

1 Answers1

0

If you are sending a msg.payload of {} that is an empty object.

The error is saying you need to have a text or a img field in the object (with a sensible value)

hardillb
  • 54,545
  • 11
  • 67
  • 105