Node red newby - change node - to string with payload parameter

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

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:

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

as far as I can tell, the token is in payload.token not payload.token.value

i.e. use http://192.168.178.163:8080/api/v1/status?token={{payload.token}}


the best way to ensure accuracy when entering the path to a property is to use the features provided (copy path)...

There’s a great page in the docs that will explain how to use the debug panel to find the right path to any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

BX00Cy7yHi

https://nodered.org/docs/user-guide/messages

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