Search code examples
webhooksactions-on-googledialogflow-es

Why the API.AI always return "Webhook call failed. Error: Webhook response was empty."


When I create the actions on google project and API.AI agent, I use my own service to be API.AI fulfillment webhook. I expect that API.AI will call my webhook. But when I test it by simulator of actions on google, the API.AI always return:

"message": "Unexpected apiai response format: Empty speech response",
"apiResponse": {
  "id": "905d5727-bea8-4630-8d3a-e6c173159a94",
  "timestamp": "2017-09-28T02:20:06.954Z",
  "lang": "en",
  "result": {},
  "status": {
    "code": 206,
    "errorType": "partial_content",
    "errorDetails": "Webhook call failed. Error: Webhook response was empty."
  },
  "sessionId": "1506565201634"
}

But when I check the logs of apache, the API.AI did not call my webhook! When I replace the webhook url to firebace functions, it work success. But if I use my own service url to be API.AI webhook url, the API.AI do not call the webhook anyway. My service use https.


Solution

  • OK, I solved the problem. The reason is the configuration of https. It should add ca in ssl options. The details of the solution see the link: https://discuss.api.ai/t/webhook-does-not-work-with-https/6708/8