question

Ivie O avatar image
Ivie O asked ·

Webhook subscription error C#

Hello,

I am getting an error on my webhook subscription.,

sub-521 WebHook is not reachable, even though I can see that the webhook is being invoked because it hits the breakpoint inside the if statement shown in attached; see error below that. I get a Status 200 Ok response when I invoke the webhook from PowerShell or Postman. I am using ASP.NET/C#. I've also included the subscription code. Thank you for your help.

subscriptionswebhook
1570450847657.png (81.0 KiB)
1570451053764.png (108.3 KiB)
1570451412644.png (106.0 KiB)
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered ·

The message "Webhook is not reachable" could meant the validateToken was not returned in time or not returned at all.

Did you follow the instructions exactly shown in this quick start? If not, try that.

You highlighted the error on line 45. If that is true, what is the error details?

1 comment Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

The setup I have is based on the quick start guide. There are three attachments in my original post. The first is the webhook, the second is the detailed error, the third is the subscription. I do see the verificationToken in the webhook but perhaps it is not returned on time. I notice a small delay (about 2 secs) after the request to create subscription is invoked. My understanding is the verificationToken must be returned within 1 sec. Is there something I need to do to ensure timely return of verificationToken?

0 Likes 0 · ·
Ivie O avatar image
Ivie O answered ·

It works when I create the webhook project from the command line (dotnet new web). I am only seeing that error when I create the web project in Visual Studio (empty template).

1 comment Share
1 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Great! But that's weird. I will try to replicate the problem and find the root cause to fix when I have time.

0 Likes 0 · ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.