Takk, fungerte bra. Aldri brukt Node-Red før, men her er flowen min.
[{"id":"7ce7a7849c9c8b4e","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"276071b26f3e49a2","type":"inject","z":"7ce7a7849c9c8b4e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":220,"wires":[["fb25d94b.139e78"]]},{"id":"fb25d94b.139e78","type":"http request","z":"7ce7a7849c9c8b4e","name":"Get Token","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://api.drivstoffappen.no/api/v1/authorization-sessions","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"x":330,"y":220,"wires":[["9b28d83a.0226d"]]},{"id":"9b28d83a.0226d","type":"function","z":"7ce7a7849c9c8b4e","name":"Process Token","func":"msg.token = JSON.parse(msg.payload).token;\nmsg.tokenBytes = Buffer.from(msg.token);\nmsg.shiftedBytes = Buffer.concat([msg.tokenBytes.slice(1), msg.tokenBytes.slice(0, 1)]);\nmsg.shiftedToken = msg.shiftedBytes.toString();\nreturn msg;","outputs":1,"timeout":"","noerr":0,"initialize":"","finalize":"","libs":[],"x":520,"y":220,"wires":[["bc5b206f4b80b029"]]},{"id":"17f2e29c.f0c2b3","type":"http request","z":"7ce7a7849c9c8b4e","name":"API Request","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://api.drivstoffappen.no/api/v1/stations?stationTypeId=1","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[{"keyType":"other","keyValue":"X-API-KEY","valueType":"msg","valueValue":"md5Hash"},{"keyType":"other","keyValue":"X-CLIENT-ID","valueType":"other","valueValue":"com.raskebiler.drivstoff.appen.ios"}],"x":850,"y":220,"wires":[["77f3986f.d5f32c"]]},{"id":"77f3986f.d5f32c","type":"debug","z":"7ce7a7849c9c8b4e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1030,"y":220,"wires":[]},{"id":"bc5b206f4b80b029","type":"md5","z":"7ce7a7849c9c8b4e","name":"MD5","fieldToHash":"shiftedToken","fieldTypeToHash":"msg","hashField":"md5Hash","hashFieldType":"msg","x":690,"y":220,"wires":[["17f2e29c.f0c2b3"]]}]