No internet connection
  1. Home
  2. General

Use TA Web API as callback url for Webhook events from 3rd party

By @matty
    2022-11-10 03:35:11.817Z2022-11-10 03:47:36.385Z

    Hi there,

    Is this possible? I have tried to get it to work to no avail. I don't think TA web api can respond correctly to this, meaning that Trello will not accept the TA web API as a callback url.

    https://developer.atlassian.com/cloud/trello/guides/rest-api/webhooks/#webhook-sources

    The requirements are as follows: https://developer.atlassian.com/cloud/trello/rest/api-group-webhooks/#api-webhooks-post

    Thanks,

    Matty

    Solved in post #11, click to view
    • 11 replies
    1. D
      Daniel Horton @daniel.horton
        2022-11-10 10:59:38.425Z

        Hi Matty,

        So you are looking to call ThinkAutomation with a JSON payload via a webhook event that is configured within Trello? Though from what you are saying you believe that ThinkAutomation's reply which looks like this is not valid for Trello?:

        1. M@matty
            2022-11-10 18:03:04.823Z2022-11-10 19:44:44.066Z

            Yes correct. TA API is also not valid for Mandrill

            Perhaps I'll need to use something like this: https://www.webhooks.io/

          • D
            In reply tomatty:
            Daniel Horton @daniel.horton
              2022-11-11 11:16:05.492Z

              Hi Matty,

              Thank you. Yes it is currently an Accepted 202 which these services do not appear to validate as a successful reply.

              We will allow for the response to be configured in the webhook's call using the query string parameter of "&responsestatus=200". If this is not provided then it defaults to Accepted 202. This will be in our next public release.

              1. DDaniel Horton @daniel.horton
                  2022-11-17 09:39:05.222Z

                  Hi Matty,

                  The public gateway for ThinkAutomation now accepts the new "&responsestatus=200" functionality.

                  You can take advantage of this from today if you are using the public API URL for your functionality. If you are using the local URL then please await our next release.

                  1. M@matty
                      2022-11-17 18:07:27.537Z

                      Hi Daniel,

                      Thank you but this still does not work. As above the requirements for most of these webhooks (Trello and Mandrill etc. ) is that we make a POST request.

                      When I try a post request the api does not send a response, thus the endpoint can not be registered as a webhook.

                      1. DDaniel Horton @daniel.horton
                          2022-11-18 09:20:42.388Z

                          Hi Matty,

                          A Post works but you need to send body content. What is it the applications are sending through please?

                    • S
                      In reply tomatty:
                      Stephen Parker @stephenparker
                        2022-11-18 10:10:31.534Z

                        Currently the content-length of a POST needs to be >0. Is your post sending no postdata?

                        1. M
                          In reply tomatty:
                          @matty
                            2022-11-21 22:39:17.848Z2022-11-21 23:01:25.073Z

                            Hi Stephen,

                            In Mandrill first you need to register the webhook. In this step Mandrill sends a HEAD request that looks like the below. Trello is much the same, the webhook (thinkautomation) needs to respond correctly to the HEAD request. Even when I add the responsestatus=200 parameter mandrill and Trello can not register the webhook as ThinkAutomation does not respond correctly:

                            below is an example when registering a webhook.site url, this is successful:
                            curl -X 'HEAD' 'https://webhook.site/3421b7b3-749b-463c-b349-1db554cfba7b' -H 'connection: close' -H 'accept: /' -H 'host: webhook.site' -H 'user-agent: backend' -H 'content-length: ' -H 'content-type: '

                            Whereas when I try with the TA url it fails:

                            1. M@matty
                                2022-11-25 19:54:55.823Z

                                Hi @stephenparker, any updates or thoughts on how the api.thinkautomation.com endpoint can be used to register webhooks with mandrill or Trello? This would be very useful.

                                Thanks,

                                Matt

                              • S
                                In reply tomatty:
                                Stephen Parker @stephenparker
                                  2022-11-26 08:20:39.298Z

                                  Hi Matt,

                                  We will update the TA gateway to respond to HEAD requests. I'll post here once the gateway is updated.

                                  Thanks
                                  Stephen

                                  Reply1 LikeSolution
                                  1. M@matty
                                      2022-12-05 17:06:45.289Z

                                      Hi @stephenparker I just had a test of this and it doesn't look like it is updated. Any news?

                                      Thanks,

                                      Matt