C# .Net Console Application as HTTP integration endpoint

Helo everyone,

Hopefully someone could point towards the right direction - and if it’s even possible!

We currently have a TTN application collecting data via TTN Data Storage integration, then a script every 5 minutes pulling this data in.

We want to utilise the HTTP integration so we can have live data hitting our server, trigger any actions needed and then save directly to our database. All this would be handled in a C# console app.

Are there any examples or tips on where to start?


1 Like

Why not subscribe to the MQTT messages, way easier and live data, and your C# app can do whatever you want with the data

See here: https://www.thethingsnetwork.org/docs/applications/mqtt/api.html

If you want to use the HTTP integration instead of MQTT then use a ASP.NET Core Web-API as a backend. You just have to create a simple data object and create a Controller that contains a method for your request (e.g. GET or POST) and that will receive your data object (use [FromBody]). It is very simple… just have a look at a Web-API tutorial.

I’ve been trying to figure out how to get the data that is posted from the HTTP integration in the ASP.net controller for a couple days. There are no examples available anywhere. HELP!