Always return No DesignTimeAgent found (even using the prebuilt agent template) when testing with detectIntent API in DialogFlow using "Try this API". The API I tried is "projects.agent.sessions.detectIntent".
The session parameter is "projects/dialogflow-293106/agent/sessions/123123123"
and request body is:
{ "queryInput": { "text": { "text": "hi", "languageCode": "en" } } }
The following error returned:
{ "error": { "code": 404, "message": "com.google.apps.framework.request.NotFoundException: No DesignTimeAgent found for project 'dialogflow-293106'.", "status": "NOT_FOUND" } }
There are multiple reasons why this error may occur for Dialogflow ES Edition. One is that for agents located in regions which are outside the US. At this point, the API Explorer for projects.agent.sessions.detectIntent doesn’t support other regions outside the US. Since to make an API request for other regions, you must add the location parameters to define the region. You may consider testing the detectIntent API method using other methods as described here.
This error may also occur if the project ID defined in the request is incorrect or doesn’t have an agent linked to it. To verify the project ID of the agent, you may check this information in the agent's general settings.
In addition to that, currently, the API Explorer for Dialogflow CX APIs is not available. Dialogflow ES and Dialogflow CX have different sets of API methods. If you are trying to call a CX agent using the detectIntent method for an ES agent, it will also return an error message. If you want to test your Dialogflow CX agent through REST API, you may check this documentation for an overview of API methods available.
Here’s the detectIntent request for Dialogflow CX agents. You can interact with the APIs as described in the link provided.