Forum Discussion
thadthig
Feb 02, 2021Copper Contributor
Custom incoming webhook URL not working
Having trouble testing my custom incoming webhook. Messages POSTed are not being delivered and a strange message is returned in the tools. I an calling getSettings() inside registerOnSaveHandler()...
Nikitha-MSFT
Feb 04, 2021Iron Contributor
thadthig - the data variable should be stringified in the ajax call. Could you please check the below code?
microsoftTeams.settings.getSettings(function (settings) { // We get the Webhook URL in settings.webhookUrl which needs to be saved. $.ajax({ url: '/Home/Save', type: 'post', contentType: 'application/json', data: JSON.stringify({ webhookUrl: settings.webhookUrl, eventType: eventType }), success: function (data, textStatus, jQxhr) { console.log('webhook created successfully.'); }, error: function (jqXhr, textStatus, errorThrown) { console.log('error', errorThrown); } }); }); saveEvent.notifySuccess();
- thadthigFeb 04, 2021Copper Contributor
Nikitha-MSFT Thanks for the reply, but I disagree this is the issue. The post payload is getting sent to my backend just fine. I also display it on the UI and I just cut and paste it into Postman.
Like I said it used to work and is working again today without any code changes. I will test and see if it happens again.
Next hurdle is the new message at the bottom: Possible https://answers.microsoft.com/en-us/msteams/forum/all/microsoft-teams-important-your-connector-is/59452bf4-f87a-4503-9bfb-a8333724bee5.
Regards,
Thad