Vonage/vonage-dotnet-code-snippets

Messages API Webhook Sample Requested

sir-luke-coop opened this issue · 1 comments

Howdy!

I'm interested in some sample code for the Messages API webhooks - specifically Delivery Receipt and Inbound Message. Pretty much what the SmsController does: https://github.com/Vonage/vonage-dotnet-code-snippets/blob/master/DotNetWebhookCodeSnippets/Controllers/SmsController.cs

Related:

  1. Vonage/vonage-dotnet-sdk#297
  2. Vonage/vonage-dotnet-sdk#298

Ideally, I could just replace:
"var sms = WebhookParser.ParseQuery(Request.Query);"
with
"var message = WebhookParser.ParseQuery(Request.Query);"

At least, I think that is ideal. Is there already a way? If so, please point me in the right direction.

Thanks!

Hi @sir-luke-coop,

Looks like we're a year late - sorry about that. This is not the repo we monitor the most for support and issues.

You're right - just make sure to pass the generics version of that method ParseQuery<T> or ParseWebhook<T>. Please note we don't always provide webhooks objects out of the box as they are expensive to maintain.