kallaikarthi
kallaikarthi

Reputation: 1

API.ai Issue in connecting with local server

I was new to API.ai and I created a sample application for that I am using my own local web service which will be running on my local machine with the URL "http://0.0.0.0:5000/webhook" I have enabled and added the URL in the fulfilments and in the indents under the fulfilment tab I checked the use webhook but while I was trying to run the project the post action does not take place. and the web service does not trigger from my sample API ai application and in the JSON I get the status as

"status": { "code": 206, "errorType": "partial_content", "errorDetails": "Webhook call failed. Error: Webhook response was empty." },

What should i need to do?

Kindly assist me regarding this issue

Upvotes: 0

Views: 395

Answers (1)

Cakes
Cakes

Reputation: 98

You can't fill in your localhost, API.ai has no idea how to reach that from their side. It's only accessible on your own machine.

You would need something like ngrok. ngrok will expose your localhost to the internet making it accessible from outside sources like API.ai for example.

Simple download the ngrok zip file and open up the terminal/command line. Depending on your OS you could run ngrok with:

ngrok http 5000

After that simply copy/paste the https url that ngrok exposes for you and put it as url in the fulfillment page on API.ai.

Upvotes: 1

Related Questions