[{"id":"717aba99.62f504","type":"http request","z":"241c41a6.95cfae","name":"Get JTW token","method":"POST","ret":"obj","paytoqs":false,"url":"https://domain.com/wp-json/jwt-auth/v1/token","tls":"","persist":false,"proxy":"","authType":"","x":619.9999771118164,"y":769.5999412536621,"wires":[["538213d9.fee86c","c689e49a.c86ed8"]]},{"id":"fcb31f05.f21cf","type":"debug","z":"241c41a6.95cfae","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1288.1999588012695,"y":899.5999031066895,"wires":[]},{"id":"f4a28ef2.e238d","type":"inject","z":"241c41a6.95cfae","name":"","topic":"","payload":"{\"username\":\"username\",\"password\":\"password\",\"title\":\"My Nice New Title\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":435.89996337890625,"y":835.999942779541,"wires":[["717aba99.62f504","21a26cb4.d64d04","783bdb3f.f5e1f4"]]},{"id":"21a26cb4.d64d04","type":"debug","z":"241c41a6.95cfae","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"headers","targetType":"msg","x":594.4000244140625,"y":921.9999437332153,"wires":[]},{"id":"f3f5063d.157938","type":"function","z":"241c41a6.95cfae","name":"add token","func":"msg.headers[\"Authorization\"] = 'Bearer ' + msg.payload[1].token;\n\n\n\nmsg.payload = msg.payload[0];\n\n\nreturn msg;","outputs":1,"noerr":0,"x":1044.9999771118164,"y":750.9999408721924,"wires":[["c72785da.471588","79a29d8e.a857e4"]]},{"id":"783bdb3f.f5e1f4","type":"function","z":"241c41a6.95cfae","name":"Add data","func":"msg.payload.title = \"New nice Title\";\n\nreturn msg;","outputs":1,"noerr":0,"x":618.5999755859375,"y":845.9999418258667,"wires":[["c689e49a.c86ed8"]]},{"id":"c689e49a.c86ed8","type":"join","z":"241c41a6.95cfae","name":"Combine","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":851.5999755859375,"y":882.999942779541,"wires":[["11a31f0a.fbe3b1"]]},{"id":"79a29d8e.a857e4","type":"http request","z":"241c41a6.95cfae","name":"Post new title","method":"POST","ret":"txt","paytoqs":false,"url":"https://domain.com/wp-json/wp/v2/posts/1","tls":"","persist":false,"proxy":"","authType":"","x":1128.0000801086426,"y":855.9999656677246,"wires":[["fcb31f05.f21cf"]]},{"id":"538213d9.fee86c","type":"debug","z":"241c41a6.95cfae","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":813.9999771118164,"y":751.9999408721924,"wires":[]},{"id":"c72785da.471588","type":"debug","z":"241c41a6.95cfae","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1253.9999809265137,"y":755.9999389648438,"wires":[]},{"id":"11a31f0a.fbe3b1","type":"change","z":"241c41a6.95cfae","name":"","rules":[{"t":"delete","p":"statusCode","pt":"msg"},{"t":"delete","p":"responseUrl","pt":"msg"},{"t":"delete","p":"redirectList","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":912.3999786376953,"y":804.999942779541,"wires":[["f3f5063d.157938"]]}]
And this a test part where I use an inject node to start asking for a JWT token - with username and password. This succeeds - I get a token back. I now placed that token in the headers, but the second request with the token instead of the username and password gives a 503 back. Sorry for being unclear in my last reply.
(in both flows I removed some privacy and non relevant content parts, hence some empty function nodes)