# I am not able to create webhook

**URL:** <https://forum.asana.com/t/i-am-not-able-to-create-webhook/25574>\
**Category:** API & Developers\
**Created:** [5 July 2018 08:33 UTC](https://forum.asana.com/t/i-am-not-able-to-create-webhook/25574 "2018-07-05T08:33:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ravinder\_Rana](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ravinder_rana/32/20464_2.png) [@Ravinder\_Rana](https://forum.asana.com/u/Ravinder_Rana)\
**Post date:** [5 July 2018 08:33 UTC](https://forum.asana.com/t/i-am-not-able-to-create-webhook/25574/1 "2018-07-05T08:33:43Z")

</div>

**Error details are as below ,please suggest .**  
{  
“errors”: [  
{  
“message”: “Could not complete activation handshake with target URL. Please ensure that the receiving server is accepting connections and supports SSL”,  
“help”: “For more information on API status codes and how to handle them, read the docs on errors: [Build an app with Asana](https://asana.com/developers/documentation/getting-started/errors)”  
}  
]  
}

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [5 July 2018 08:54 UTC](https://forum.asana.com/t/i-am-not-able-to-create-webhook/25574/2 "2018-07-05T08:54:20Z")

</div>

The issue is most likely one of two things: either you’re not doing the correct sequence of events to establish the webhook, or it’s an SSL issue.

For the former, make sure you’re precisely following [the instructions for establishing a webhook](https://asana.com/developers/api-reference/webhooks#create); there is also some discussion of it [in this forum thread](https://forum.asana.com/t/x-hook-secret-only-32-chars/5086/6).

People have also had issues with some SSL certificates and related server settings; see [this thread](https://forum.asana.com/t/not-getting-a-response-to-create-webhook-request/9908) and [this thread](https://forum.asana.com/t/x-hook-secret-only-32-chars/5086) for some discussion of SSL-related problems.

---

<div class="post-metadata">

**Author:** ![Kevin\_Lieser](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/kevin_lieser/32/5056_2.png) [@Kevin\_Lieser](https://forum.asana.com/u/Kevin_Lieser)\
**Post date:** [5 July 2018 09:19 UTC](https://forum.asana.com/t/i-am-not-able-to-create-webhook/25574/3 "2018-07-05T09:19:24Z")

</div>

Make also sure not to use H2 (http2) – that was my problem – not the certificate as I thought.

---

<div class="post-metadata">

**Author:** ![Ravinder\_Rana](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ravinder_rana/32/20464_2.png) [@Ravinder\_Rana](https://forum.asana.com/u/Ravinder_Rana)\
**Post date:** [7 July 2018 07:55 UTC](https://forum.asana.com/t/i-am-not-able-to-create-webhook/25574/6 "2018-07-07T07:55:08Z")

</div>

> Request/Response

Steps  
1. Creating webhook:-  
var client = new RestClient(“[https://app.asana.com/api/1.0/webhooks](https://app.asana.com/api/1.0/webhooks)”);  
var request = new RestRequest(Method.POST);  
request.AddHeader(“content-type”, “application/x-www-form-urlencoded”);  
request.AddHeader(“authorization”, "Bearer key ");  
request.AddParameter(“application/x-www-form-urlencoded”, “resource=project\_id&target=[https://domain.net/AsanaWebhook/TargetWebHook](https://domain.net/AsanaWebhook/TargetWebHook)”, ParameterType.RequestBody);

```
IRestResponse response = client.Execute(request);

2. Error:

{
    "errors": [
        {
            "message": "Could not complete activation handshake with target URL. Please ensure that the receiving server is accepting connections and supports SSL",
            "help": "For more information on API status codes and how to handle them, read the docs on errors: https://asana.com/developers/documentation/getting-started/errors"
        }
    ]
}
           
3. Target end point code .

public HttpResponseMessage TargetWebHook()//Stream data
{
            //TODO
            var headers = Request.Headers;
            HttpResponseMessage _response = new HttpResponseMessage();
            if (headers.AllKeys.Contains("X-Hook-Secret"))
            {
                var key = headers["X-Hook-Secret"];
                _response.Headers.Add("X-Hook-Secret", key);
                _response.StatusCode = HttpStatusCode.OK;            
            }
            return _response;//Json("OK", JsonRequestBehavior.AllowGet);

  }

```

This is exactly what I am doing .

---

<div class="post-metadata">

**Author:** ![Ravinder\_Rana](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ravinder_rana/32/20464_2.png) [@Ravinder\_Rana](https://forum.asana.com/u/Ravinder_Rana)\
**Post date:** [7 July 2018 07:58 UTC](https://forum.asana.com/t/i-am-not-able-to-create-webhook/25574/7 "2018-07-07T07:58:41Z")

</div>

**Request/Response**

1. Creating webhook:-  
var client = new RestClient(“[https://app.asana.com/api/1.0/webhooks](https://app.asana.com/api/1.0/webhooks)”);  
var request = new RestRequest(Method.POST);  
request.AddHeader(“content-type”, “application/x-www-form-urlencoded”);  
request.AddHeader(“authorization”, "Bearer key ");  
request.AddParameter(“application/x-www-form-urlencoded”, “resource=project\_id&target=[https://domain.net/AsanaWebhook/TargetWebHook](https://domain.net/AsanaWebhook/TargetWebHook)”, ParameterType.RequestBody);

IRestResponse response = client.Execute(request);

1. Error:

{  
“errors”: [  
{  
“message”: “Could not complete activation handshake with target URL. Please ensure that the receiving server is accepting connections and supports SSL”,  
“help”: “For more information on API status codes and how to handle them, read the docs on errors: [Build an app with Asana](https://asana.com/developers/documentation/getting-started/errors)”  
}  
]  
}

1. Target end point code .

public HttpResponseMessage TargetWebHook()//Stream data  
{  
//TODO  
var headers = Request.Headers;  
HttpResponseMessage \_response = new HttpResponseMessage();  
if (headers.AllKeys.Contains(“X-Hook-Secret”))  
{  
var key = headers[“X-Hook-Secret”];  
\_response.Headers.Add(“X-Hook-Secret”, key);  
\_response.StatusCode = HttpStatusCode.OK;  
}  
return \_response;//Json(“OK”, JsonRequestBehavior.AllowGet);

}

This is exactly what I am doing .

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [7 July 2018 13:02 UTC](https://forum.asana.com/t/i-am-not-able-to-create-webhook/25574/8 "2018-07-07T13:02:25Z")

</div>

Your code looks good to me. A few things:

Where you have **project\_id** , you’re putting the actual id of one of your projects and not the literal string **project\_id** , correct?

For your authorization, you’re putting the literal string **Bearer** , then a space, then your auth key, correct?

Pretty sure you’re doing all of the above, I just wanted to eliminate all possible code issues.

Also, are you able to remotely debug or put some logging and see if your TargetWebHook endpoint is getting hit when you do the initial call? Where is it - is it on Azure or some other server?

---

<div class="post-metadata">

**Author:** ![Ravinder\_Rana](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ravinder_rana/32/20464_2.png) [@Ravinder\_Rana](https://forum.asana.com/u/Ravinder_Rana)\
**Post date:** [9 July 2018 06:20 UTC](https://forum.asana.com/t/i-am-not-able-to-create-webhook/25574/9 "2018-07-09T06:20:12Z")

</div>

First of all thanks Phil for your time .

1. Yes offcourse project\_id is actual id .
2. Secondly for authorization Bearer is the format and key means my key which i generated in Asana .
3. It is published on Azure and url is in format [https://domain.net](https://domain.net) and yes i am able to hit TargetWebHook both on published and local as well .

Thanks .

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [9 July 2018 14:01 UTC](https://forum.asana.com/t/i-am-not-able-to-create-webhook/25574/10 "2018-07-09T14:01:17Z")

</div>

Ahh wait, is your webhook code also handling receipt of an X-Hook-Signature webhook? As soon as you respond to the initial X-Hook-Secret webhook, [they will send an X-Hook-Signature one and you have to respond to that one as well](https://forum.asana.com/t/api-webhook-create-not-working/2487/4).

---

<div class="post-metadata">

**Author:** ![Ravinder\_Rana](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/ravinder_rana/32/20464_2.png) [@Ravinder\_Rana](https://forum.asana.com/u/Ravinder_Rana)\
**Post date:** [10 July 2018 16:22 UTC](https://forum.asana.com/t/i-am-not-able-to-create-webhook/25574/11 "2018-07-10T16:22:50Z")

</div>

Hello Phil,

Request 1  
[https://app.asana.com/api/1.0/webhooks](https://app.asana.com/api/1.0/webhooks)  
It hits the target url with “X-Hook-Secret” and Respond 200 .I have added “X-Hook-Signature” but it does’t hit again with “X-Hook-Signature” .  
Finally request 1 return with

**{“errors”:[{“message”:“Could not complete activation handshake with target URL. Please ensure that the receiving server is accepting connections and supports SSL”,“help”:“For more information on API status codes and how to handle them, read the docs on errors: [Build an app with Asana](https://asana.com/developers/documentation/getting-started/errors)”}]}**

**Moreover my SSL Details are**  
[https://www.screencast.com/t/xZgQBRg4tx](https://www.screencast.com/t/xZgQBRg4tx)

Code  
if (headers.AllKeys.Contains(“X-Hook-Secret”))  
{  
var key = headers[“X-Hook-Secret”];  
\_response.Headers.Add(“X-Hook-Secret”, key);

}  
else if (headers.AllKeys.Contains(“X-Hook-Signature”))  
{  
//Handle Event .Will do later  
var Secretkey = headers[“X-Hook-Signature”];  
\_response.Headers.Add(“X-Hook-Signature”, Secretkey);

}

Thanks .

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 19:08 UTC](https://forum.asana.com/t/i-am-not-able-to-create-webhook/25574/12 "2025-05-30T19:08:28Z")

</div>


