Getting uplink messages from ttn

hello everyone. I need your help. How can i get the messages that i sent to ttig from my endnodes? Actually, I want to output the data that i send to ttig to a server. How can I do it?

Good question.

Data received by a TTIG is forwarded to TheThingsStack and from there on it can be received in various different ways, usually called ‘integrations’ now. You can look these up in the console under ‘integrations’ of the appliction.

I believe the MQTT ‘integration’ is the oldest and most basic one. MQTT is a pub/sub-protocol. TTN runs a MQTT-server and does most of the publishing (e.g. your payload data) and you can subscribe to it using an MQTT-client, like mosquitto. This is described here: MQTT Server | The Things Stack for LoRaWAN

For example, you could use the mosquitto_sub client as follows:

mosquitto_sub -h eu1.cloud.thethings.network -u your-application-name@ttn -P your-mqtt-api-key -t “v3/+/devices/+/up” -v

and it will show you the uplink messages as JSON.
The data format is described here:
https://www.thethingsindustries.com/docs/reference/data-formats/

You can create an mqtt-api-key in the console.

There are other integrations, e.g. the various ‘web hook’ integrations, which typically push the uplink data to some particular service in their particular format. Each one has their own link with more information if you look them up in the console.

Thank you very much. It’s okey.