# Connect to ADAX Neo heater API

**URL:** <https://discourse.nodered.org/t/connect-to-adax-neo-heater-api/83395>\
**Category:** General\
**Tags:** http-request\
**Created:** [2 December 2023 22:31 UTC](https://discourse.nodered.org/t/connect-to-adax-neo-heater-api/83395 "2023-12-02T22:31:48Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [2 December 2023 22:48 UTC](https://discourse.nodered.org/t/connect-to-adax-neo-heater-api/83395/2 "2023-12-02T22:48:25Z")

</div>

> [404 Not Found - HTTP | MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404)

also is the basic api key in base64 encoded

> **[Authorization - HTTP | MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization#examples)**
>
> The HTTP Authorization request header can be used to provide credentials that authenticate a user agent with a server, allowing access to a protected resource.

Finally you flow.json is corrupt as you have not posted it correctly

In order to make code readable and usable it is necessary to surround your code with three backticks (also known as a left quote or backquote `````)

````auto
``` 
   code goes here 
```

````

You can edit and correct your post by clicking the pencil ✏ icon.

See this post for more details - [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506)

[edit]  
you can try this example If it does not work try setting the method to POST to.

```auto
[{"id":"7b7a69fa8e099eed","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":800,"y":1740,"wires":[["0a03c04733728ae0"]]},{"id":"0a03c04733728ae0","type":"function","z":"d1395164b4eec73e","name":"function 1","func":"var d = Math.floor(new Date().getTime() / 1000);\n var token = 12345678;\n \n msg.url = \"https://172.16.6.2/api\";\n msg.rejectUnauthorized = false;\n \n msg.headers = { 'Authorization': 'Basic ' + token };\n //msg.headers = {}; \n //msg.headers['Authorization'] = 'Basic 12345678';\n \n msg.timeout = 15;\n \n msg.payload = {\n \"command\":\"set_target\",\n \"time\": d,\n \"value\": \"1800\"\n };\n \n return msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":980,"y":1740,"wires":[["89fb703cf6594aac","8b2d9ea2bbaf71ce"]]},{"id":"89fb703cf6594aac","type":"http request","z":"d1395164b4eec73e","name":"","method":"GET","ret":"obj","paytoqs":"body","url":"","tls":"","persist":false,"proxy":"","insecureHTTPParser":false,"authType":"","senderr":false,"headers":[],"credentials":{"user":"","password":""},"x":1210,"y":1740,"wires":[["59eaed8789db5ee7"]]},{"id":"8b2d9ea2bbaf71ce","type":"debug","z":"d1395164b4eec73e","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1220,"y":1820,"wires":[]},{"id":"59eaed8789db5ee7","type":"debug","z":"d1395164b4eec73e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1350,"y":1740,"wires":[]}]

```

---

_[View the full topic](https://discourse.nodered.org/t/connect-to-adax-neo-heater-api/83395)._
