# Device ID not Populating in HTTP Integration URL

**URL:** <https://www.thethingsnetwork.org/forum/t/device-id-not-populating-in-http-integration-url/35977>\
**Category:** v2 Backend\
**Created:** [April 7, 2020, 10:00am UTC](https://www.thethingsnetwork.org/forum/t/device-id-not-populating-in-http-integration-url/35977 "2020-04-07T10:00:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![charl\_naude](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/charl_naude/32/35697_2.png) [@charl\_naude](https://www.thethingsnetwork.org/forum/u/charl_naude)\
**Post date:** [April 7, 2020, 10:00am UTC](https://www.thethingsnetwork.org/forum/t/device-id-not-populating-in-http-integration-url/35977/1 "2020-04-07T10:00:32Z")

</div>

Hi Community

I am busy integrating a LoRaWAN device with the [Thinger.IO](http://Thinger.IO) platform, through the use of The Things Network and the TTN plugin available on [Thinger.IO](http://Thinger.IO).

So far I have the uplink working perfectly, but I am currently having problems with the downlink.

[Thinger.IO](http://Thinger.IO) supplies two separate URLs for the uplink and downlink HTTP integration. The downlink URL needs to end with the device ID, as follows:

![Thinger.IO Recommend Downlink URL](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/3/8/388839a2184c2b4bb5a91d6c7ecb5d8109dbfd5b.png)

If I “hardcode” the downlink URL when setting up the HTTP integration (see below), the downlink integration works fine, but my problem is that since there will be multiple devices in an application (I already have two devices registered), this downlink URL needs to be auto-populated with the relevant device IDs.

![Hardcoded Downlink URL](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/1/7/17a2b9f725fe5b34134dce940a5c9ad28bf3fe9a.png)

I have tried the following method of setting up the dwonlink HTTP integration and after reading other posts on the forum, I’m sure that the name for the device ID (dev\_id) is correct, but checking the HTTP post on request basket ([https://rbaskets.in/](https://rbaskets.in/)), the device ID (dev\_id) does not auto-populate with the relevant device ID (lorawan\_dev\_device).

**Downlink URL for Auto-populating Device ID**  
 ![URL from TTN](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/2/4/24de829c52b8394a766a6d90d2e464e23b4a2522.png)

**Downlink URL for Testing on Request Basket**  
 ![Request Basket Test URL](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/8/2/82140dcae46612d3792e85b4d6847efad62cdea3.png)

Below is what Request Basket received:  
 ![image](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/3/a/3a3831de8052caa848d71d926862957a1ee5956b.png)  
 ![image](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/6/c/6c7ea61da967c97f9bc6e88f877ee16e4fada3ff.png)

Hope that someone can assist me.

P.S. I had to blank out part of the URLs for privacy purposes.

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [April 7, 2020, 10:42am UTC](https://www.thethingsnetwork.org/forum/t/device-id-not-populating-in-http-integration-url/35977/2 "2020-04-07T10:42:16Z")

</div>

**In the TTN Integration** , changing the URL is not supported; see [How add data field to URL in HTTP Integration?](https://www.thethingsnetwork.org/forum/t/how-add-data-field-to-url-in-http-integration/32452)

But it seems the redacted URLs are not the URLs as configured in the integration? (The HTTP Integration only allows for one URL, as invoked after an uplink.) Then I don’t know. Seems to be a question for [Thinger.IO](http://Thinger.IO) then?

---

<div class="post-metadata">

**Author:** ![charl\_naude](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/charl_naude/32/35697_2.png) [@charl\_naude](https://www.thethingsnetwork.org/forum/u/charl_naude)\
**Post date:** [April 7, 2020, 11:54am UTC](https://www.thethingsnetwork.org/forum/t/device-id-not-populating-in-http-integration-url/35977/3 "2020-04-07T11:54:57Z")

</div>

Hi Arjan

Thanks for the response.

So are you saying that TTN does not support adding custom data or variables into the URL as I’m trying to do or as one can do on the Sigfox backend for instance:

[https://www.examplewebsiteurl.com/callback?ts={time}&deviceType=MY\_DEVICE\_TYPE&latitude={lat}&longitude={lng}&ack={ack}](https://www.examplewebsiteurl.com/callback?ts=%7Btime%7D&deviceType=MY_DEVICE_TYPE&latitude=%7Blat%7D&longitude=%7Blng%7D&ack=%7Back%7D)

I can ask support on [Thinger.IO](http://Thinger.IO), but if that is the format that they require the URL to be in, I can see how they will be able to assist.

I read somewhere in the support documentation that multiple HTTP integrations are allowed and both [Thinger.IO](http://Thinger.IO) and Request Bucket received the uplink.

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [April 7, 2020, 12:43pm UTC](https://www.thethingsnetwork.org/forum/t/device-id-not-populating-in-http-integration-url/35977/4 "2020-04-07T12:43:48Z")

</div>

> [@charl\_naude](#):
>
> So are you saying that TTN does not support adding custom data or variables into the URL

Well, yes:

> [@arjanvanb](#):
>
> **In the TTN Integration** , changing the URL is not supported; see [How add data field to URL in HTTP Integration?](https://www.thethingsnetwork.org/forum/t/how-add-data-field-to-url-in-http-integration/32452)

Following the links in the responses to the above topic will give you at least 4 examples to get it done (for uplinks), but all need intermediate servers. That’s all there is to say.

> [@charl\_naude](#):
>
> I read somewhere in the support documentation that multiple HTTP integrations are allowed

That might very well be possible, but within TTN Console the HTTP Integration has no configuration for “a downlink URL”. Instead, to schedule a new downlink the integration supplies a downlink URL in the payload of whatever URL is triggered **for an uplink**. (Also visible in your screenshot. Aside: note that invoking that URL might only yield a downlink after _the next_ uplink; see [My application’s downlink is always queued for next uplink](https://www.thethingsnetwork.org/forum/t/my-applications-downlink-is-always-queued-for-next-uplink/7014).) Adding the HTTP integration to a single application multiple times, will make all of them be triggered for each uplink, and using the very same details.

**Within TTN, the HTTP Integration is not triggered for a downlink.**

If you need something triggered at [Thinger.IO](http://Thinger.IO) when a downlink happens (so: when a downlink is scheduled, and/or when it’s transmitted), then you’ll need an intermediate server that subscribes to **events** of [the MQTT API](https://www.thethingsnetwork.org/docs/applications/mqtt/api.html#downlink-events). However, those MQTT events are only notifications; they do not schedule a downlink if that’s what you’re after.
