Downlink URL 502 error API + Tago + Meshed

Hi there, I’m having issues posting a downlink messages to the downlink_url provided by TTN. I’m on the meshed network and AU915. I’ve set up the downlink integration with Tago and am seeing ‘502 Bad Gateway’ errors as the response. I’m seeing the same results with separate HTTP Post requests and curl commands.

Provided downlink URL
https://integrations.thethings.meshed.com.au/tago/api/v2/down/[APP NAME]/[KEY NAME]?key=ttn-account-v2.keyredacted

Have anyone got some insights into what is going wrong? Tago support has indicated the URL is incorrect. Thanks

Did it ever work?

Is this using the exact same URL that is given as downlink_url in the uplink’s JSON message? I find the /tago part at the start of the URL path a bit weird; for me (in EU868) that’s /ttn-eu instead.

Did they provide any additional details?

As this is using Meshed, @Maj may want to know about this, if this worked before.

This is my first attempt at downlinks so I don’t have any reference unfortunately. Looking on the forum I did see that first /tago/ as a region in other posts, as you suggested. I tried ‘ttn-au915’ but got a 404 so I assume that was wrong!

Randomly trying other values doesn’t make much sense. Please take a look at the downlink_url you get in each uplink’s JSON message for the HTTP Integration.

Please provide some links; I cannot find those.

The value provided in the uplink JSON is as per the below:

“variable”: “downlink_url”,
“value”: “https://integrations.thethings.meshed.com.au/tago/api/v2/down/[APP NAME]/[KEY NAME]?key=ttn-account-v2.keyredacted”,

Thanks

This is for the Tago integration on TTN. Tago support mentioned:

Blockquote
I just did a quick investigation on your integration with TTN. It seems that any request being made to the downlink url of your device it’s reporting Error 502: Bad Gateway… I would recommend you to check with TTN why this is happening, as it seems a very specific error on your device only.

That’s everything I got before reaching out on the forum.

Sorry for the miscommunication. I meant that I saw other forum posts mentioning downlink URLs and the format was different to what I’m seeing. Example 1, Example 2. I haven’t been able to confirm the format of the Meshed downlink URL.

My URL
https://integrations.thethings.meshed.com.au/tago/api/v2/down/[APP NAME]/[KEY NAME]?key=ttn-account-v2.keyredacted

Example URL
https://integrations.thethingsnetwork.org/ttn-asia-se/api/v2/down/[APP NAME]/[KEY NAME]?key=ttn-account-v2.keyredacted

Thanks

Does anyone have any insights or is currently using downlinks on the meshed network? I’ve recreated all devices and still receive 502 errors on the downlink_url provided in uplink messages.
Thanks

We don’t have any control over the Integrations. Could Tago shed any light perhaps?

Thanks for the reply @Maj
Tago are simply displaying the downlink URL provided in the uplink message and not modifying it in any way. Is my downlink URL format correct?

Thanks

I’ve not used the Tago integration before so not sure I can be of any help. We host the local TTN instance for Australia, but in terms of the Integrations we have no visibility of what they do or how they do it.

Hi @Maj thanks for your reply. I’ve been testing with the basic HTTP integration and am still seeing issues when trying to post a downlink request.

Downlink URL reported by the HTTP integration
https://integrations.thethings.meshed.com.au/ttn/api/v2/down/[APP NAME]/[KEY NAME]?key=ttn-account-v2.keyredacted

This is slightly different from the Tago reported Downlink URL which is
https://integrations.thethings.meshed.com.au/tago/api/v2/down/[APP NAME]/[KEY NAME]?key=ttn-account-v2.keyredacted

I’m doing a POST request to the HTTP integration downlink URL:
curl -i -v -X POST --data "{\"dev_id\": \"ID\", \"port\":2, \"payload_raw\": \"PAYLOAD\"}" https://integrations.thethings.meshed.com.au/ttn/api/v2/down/[APP NAME]/[KEY NAME]?key=ttn-account-v2.redacted

This results in HTTP/1.1 400 Bad Request

Am I doing something incorrect in this POST request?
Also when using the Downlink URL supplied in any uplink sent to the Tago integration I get a response of HTTP/1.1 502 Bad Gateway

Any further assistance is greatly appreciated. Thanks

As for the 400 Bad Request: did you correctly Base64-encode the payload_raw?

Why is there tago in that URL of the HTTP Integration?

Typ0, has been corrected.

I was not correctly encoding as Base64. Good pickup, thank you. With that final piece the HTTP integration downlink correctly works, however the Tago integration still does not.

Is it possible the downlink URL being provided in uplink messages to the Tago integration is incorrect? Does Tago have anything to do with the URL generation or is that TTN?

Thank you

Did you ever resolve this?

I did not. I had to use a work around with the HTTP integration. All downlink urls provided to Tago in uplink messages have a 502 error. :man_shrugging: