I have a STEM account. I wanted to connect my application / device newly created in the V3 console of the Things Network. I have followed thu guide to creating a custom webhook but keep getting a “embedded message failed validation” error.
Advice please?
Hey @RockiesIOT! can you please confirm (a) which guide are you following? (b) where are you getting this error? In TTN or Ubidots? A screenshot would help.
I am following this guide Plugins: Connect The Things Stack to Ubidots | Ubidots Help Center
error in TTN version 3 console is
{
“code”: 3,
“message”: “error:pkg/errors:validation (invalid webhook
: embedded message failed validation)”,
“details”: [
{
“@type”: “type.googleapis.com/ttn.lorawan.v3.ErrorDetails”,
“namespace”: “pkg/errors”,
“name”: “validation”,
“message_format”: “invalid {field}
: {reason}”,
“attributes”: {
“field”: “webhook”,
“name”: “SetApplicationWebhookRequestValidationError”,
“reason”: “embedded message failed validation”
},
“correlation_id”: “6e8406e8151d4a7d91a7ec6e93eda9e9”,
“cause”: {
“namespace”: “pkg/errors”,
“name”: “validation”,
“message_format”: “invalid {field}
: {reason}”,
“attributes”: {
“field”: “base_url”,
“name”: “ApplicationWebhookValidationError”,
“reason”: “value must be a valid URI”
},
“cause”: {
“namespace”: “pkg/errors”,
“name”: “request”,
“message_format”: “request to {url}
failed”,
“attributes”: {
“url”: " https://dataplugin.ubidots.com/data-plugins"
},
“code”: 2
},
“code”: 3
},
“code”: 3
}
],
“request_details”: {
“url”: “/as/webhooks/rockieslsnv50”,
“method”: “post”,
“stack_component”: “as”
}
}
Thank you for bringing this to our attention. We have contacted the TTI team to understand why the TTI console is not allowing users to create a webhook pointing to our data plugins URL. We’ll get back to this topic as soon as we have an answer
Dear @rockiesiot it seems that TTI has a 64-character limit for the path URL. In our staging environment, this worked just fine due to a shorter URL, but once in production, the URL is longer, causing this unexpected behavior. Thanks again for reporting this.
We have temporarily unpublished the plugin while we work with TTI to find the best solution. Meanwhile, can you try the following? Split the plugin URL differently in TTI:
Base URL: https://dataplugin.ubidots.com/data-plugins/plugin_code_xxxxxxxxxxxxx/function/
Uplink path: Just the final ID of the URL, which is exactly 64 characters.
We confirm the Plugin is now working. See detailed steps here: Plugins: Connect TTS to Ubidots
1 Like
Thank you for your quick attention and solution. all is OK now.
1 Like