Reputation: 211
I am working on upgrading a 3 year old api.ai app to DialogFlow. I have modified the request using the Migration Guide. I get a 404 error using the base url: https://dialogflow.googleapis.com/v2/{session=projects/Project_ID/agent/sessions/1}:detectIntent
This is from the detectIntent documentation. I am trying to use the detectIntent method, but I was having the same problem when I tried to use context. Additionally, I have tried on multiple networks. I even get a 404 when I put it in a browser. Any idea what is incorrect in my URL?
Upvotes: 4
Views: 1779
Reputation: 50701
As noted at the documentation for detectIntent, the URL uses Google API HTTP notation to document parameters and how they need to be specified. That second link isn't very useful, but basically it means that you can interpret the URL
https://dialogflow.googleapis.com/v2beta1/{session=projects/*/agent/sessions/*}:detectIntent
as
So if the session is projects/12345/agent/sessions/6789
then the URL will be
https://dialogflow.googleapis.com/v2beta1/projects/12345/agent/sessions/6789:detectIntent
Upvotes: 7