0

I'm trying to send a repsonse from my webapp back to dialogflow but get the following error

"Webhook call failed. Error: Failed to parse webhook JSON response: Cannot find field: ETag in message google.cloud.dialogflow.v2beta1.WebhookResponse."

This is my code

public class HomeController : Controller
{
    [HttpPost]
    public string Index(GoogleCloudDialogflowV2WebhookRequest obj)
    {
        var response = new GoogleCloudDialogflowV2WebhookResponse();
        response.FulfillmentText = "Hello world";
        var output = JsonConvert.SerializeObject(response);
        return output; ;
    }
}

this is the json I return

{  
   "followupEventInput":null,
   "fulfillmentMessages":null,
   "fulfillmentText":"lee",
   "outputContexts":null,
   "payload":null,
   "source":null,
   "ETag":null
} 

Any ideas? I'm using using

Google.Apis.Dialogflow.v2.Data;

Lee
  • 381
  • 1
  • 7
  • 16
  • 1
    [This looks like a duplicate](https://stackoverflow.com/questions/50242125/google-assistant-dialogflow-api-v2-webhook-etag-error) but the package data may have changed since the answer was written. – stuartd Nov 13 '18 at 17:38
  • 1
    Related: https://github.com/googleapis/google-api-dotnet-client/issues/1234 – stuartd Nov 13 '18 at 17:39
  • Thanks all, using Google.Cloud.Dialogflow.V2 instead works :) – Lee Nov 13 '18 at 17:57

0 Answers0