# Easiest way to get data from TNN via a javascript API (trying unsuccessfully with Node RED

**URL:** <https://www.thethingsnetwork.org/forum/t/easiest-way-to-get-data-from-tnn-via-a-javascript-api-trying-unsuccessfully-with-node-red/57731>\
**Category:** V3 Integrations\
**Created:** [June 26, 2022, 12:49am UTC](https://www.thethingsnetwork.org/forum/t/easiest-way-to-get-data-from-tnn-via-a-javascript-api-trying-unsuccessfully-with-node-red/57731 "2022-06-26T00:49:25Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Johan\_Scheepers](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/johan_scheepers/32/48536_2.png) [@Johan\_Scheepers](https://www.thethingsnetwork.org/forum/u/Johan_Scheepers)\
**Post date:** [June 27, 2022, 5:18am UTC](https://www.thethingsnetwork.org/forum/t/easiest-way-to-get-data-from-tnn-via-a-javascript-api-trying-unsuccessfully-with-node-red/57731/7 "2022-06-27T05:18:39Z")

</div>

Node-Red can connect direct to TTN via MQTT, Just search and read a bit on the forum, lots of information.

> **[Node-RED](https://www.thethingsindustries.com/docs/integrations/node-red/)**

The first part is a bit old but read the entire thread.

> [@MQTT in Node-RED \[HowTo\]](https://www.thethingsnetwork.org/forum/t/mqtt-in-node-red-howto/39909):
>
> [Node-RED](https://nodered.org/) has built-in support to act as an MQTT client, which can be used with [TTN’s MQTT Data API](https://www.thethingsnetwork.org/docs/applications/mqtt/). warning For new developments, one should not use the The Things Network’s [node-red-contrib-ttn](https://www.npmjs.com/package/node-red-contrib-ttn), which is no longer supported. Setting up the MQTT client The following may seem a lot of steps, but Node-RED will guide one through the initial setup. For the current version V2 as used on the TTN community network: Drop an “mqtt in” node on your flow: [mqtt in] Double-click it: …

> [@MQTT, Node-RED for large or small decoders \[HowTo\]](https://www.thethingsnetwork.org/forum/t/mqtt-node-red-for-large-or-small-decoders-howto/49855):
>
> I have some Abeeway Smart barges and micro trackers, the decoder for them are more the 4k so you can’t utilize the decoder on the “The Things Stack Community Edition”, here I am going to use Node-Red to decode the raw data for me. In the same way you can use the decoder for both small and large packet decoders. Create your application in TTN, add you device to the application. [image] In the integration add MQTT , copy your “Public TLS address”, “Username” and “Generate new API key” [ima…

---

_[View the full topic](https://www.thethingsnetwork.org/forum/t/easiest-way-to-get-data-from-tnn-via-a-javascript-api-trying-unsuccessfully-with-node-red/57731)._
