Hi,
I am new to node red (Raspberry Pi, Node Red v1.3.5), have already read many docs. However, I can't find an answer to my current problem, which I'm sure is very trivial..
I want to query the status of a device (3d printer snapmaker) via http requests. To do this, I first need to get a token via an http request POST from the device. This works. This token must then be specified as a parameter in an http GET. Here I fail.
I have so far
- an injector (timestamp)
- a http request
- POST
- URL http://192.168.178.163:8080/api/v1/connect
- return parced JSON object
The answer is for example the following
{"token":"c1f2751a-52de-4f5f-a147-909c8ff98ff4","readonly":false,"series":"Snapmaker 2.0 A350","headType":1,"hasEnclosure":true}
Now I add a http request GET. This must call the following URL http://192.168.178.163:8080/api/v1/status?token=[token]
For this I have set up a http request like this:
- Method GET
- URL http://192.168.178.163:8080/api/v1/status?token={{payload.token.value}}
- payload ignore
- return JSON object
But {{...}} is obviously not correct. I also tried it with three { with unfortunately the same result.
Unfortunately I do not get further here now.
Who can help me. Many thanks and sorry for this beginner question ....
Regards
Sepp