I have created a Dedicated Attached Webhook for a Instant Trigger module of my custom app.
This is my code. and I try to send data, webhook url to an API. but The request was accepted. Waiting for data.
{
// // Uncomment and update the following lines to implement the “attach” method.
// Request
“url”: “https://api.xxxxxxxxxxxx.com/v1/orders/{{parameters.service}}/webhooks”,
“method”: “POST”,
“headers”: {
“Accept”: “/”,
“Accept-Encoding”: “gzip, deflate, br”,
“Connection”: “keep-alive”,
“x-api-key”: “xxxxxxxxxxxxxxxxxxxxxxxx”,
“deviceid”: “xhhxxhhxx”,
“cname”: “mapp.xxxxxxxxxxx.co.uk”,
“Content-Type”: “application/json”
// “Content-Type”: “application/x-www-form-urlencoded”
},
“body”: {
“url”: “{{webhook.url}}”,
“events”: “test2,test2”
// “events”: “{{parameters.events}}”
},
// Response handling
"response": {
"output": "{{body}}",
"error": {
// "type": "{{body.code}}", // Error handling
"message": "{{body.errors}}" // On error, returns error message as "[statusCode] error text".
}
}
}
Did anybody manage to use the ATTACH functionality of webhooks?
Thanks in advance for your help!