I have the basics of Node-Red, but I am pretty green on APIs to web services. I have done it once or twice in the past and Node-Red made it so easy, such as the OpenWeatherMap node.
But now I am trying a POST Api to our self-hosted Zulip server. I would like to be able to send messages on Zulip from my Node-Red flow.
Here is the Zulip documentation. I have not figured out how to format this properly in the HTTP Request node. I have it with basic authentication I tried it with my bot ID and password entered in the node, as well as entered in the URL.
As stated, I am a bit unfamiliar to this and maybe there is something important I am missing.
At the moment, it returns an HTML document, which doesn't seem right at all. I have a struggle figuring out where my config is wrong with the info it gives me. So I assume I maybe be missing something entirely.
I would appreciate a little advice!! Thanks for your time
I should clarify that I have 2 HTTP Request nodes in the same flow. After reading in the docs a bit, I realized that can be a cause of trouble. I moved the one to another flow in the same node-red instance but it acts the same.
I was attempting to use the curl example, but I was running aground on converting that example to something that performed correctly.
This conversion is where I was struggling.
So should the https://yourZulipDomain.zulipchat.com/api/v1/messages be in the URL and the various parameters inserted via msg.payload?
I expect that I should be using the authentication fields in the node? or should this be included in msg.payload or maybe msg.headers??
I anticipate researching the structure of the POST command, but I haven't had the time yet.
I just ran the curl command from terminal with my specific information and worked successfully
In node-red, I have this code in a function node just prior to the http request node. It certainly is working better than before. But it must not like my formatting or something.