Troubleshooting

Filter this document's content by the agent type tag:

Filter this document's content by the category tag:

Enable Cloud Logging for your agent

Activate Cloud Logging for your agent. This is essential for capturing data and diagnosing problems in real conversations.

Collect Conversation IDs

When unexpected behavior occurs, collect the Dialogflow conversation IDs. These IDs, found in the Conversation History, provide a way to trace the execution path of a conversation and examine specific interactions.

API call gets permission denied

Agent type tags: Conversational Agents (Dialogflow CX), Dialogflow ES
Category tags: API, Auth

Issue

Received PERMISSION_DENIED response for API call.

Solution

Ensure you have set up (Conversational Agents (Dialogflow CX), Dialogflow ES) authentication and roles correctly. In particular, ensure you have done the following:

  • Created a service account and did not accidentally delete it.
  • Provided the service account with a role that grants permission to call the desired method.
  • Downloaded the service account private key file.
  • Set the GOOGLE_APPLICATION_CREDENTIALS environment variable to the private key file.

API call mentions unknown project

Agent type tags: Conversational Agents (Dialogflow CX), Dialogflow ES
Category tags: API, Project

Issue

Received Dialogflow API has not been used in project 32555940559 error for API call.

Solution

Ensure you have done the following:

  • Set the GOOGLE_APPLICATION_CREDENTIALS environment variable (see PERMISSION_DENIED).
  • Provided the correct project ID to the API call.

API call gets invalid authentication credentials error

Agent type tags: Conversational Agents (Dialogflow CX), Dialogflow ES
Category tags: API, Auth

Issue

Received Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. response for API call.

Solution

This may be due to manually creating credentials with your client library while specifying a non-default region. See one of the following for guidance:

API call response requests a switch to a different host

Agent type tags: Conversational Agents (Dialogflow CX), Dialogflow ES
Category tags: API, Auth

Issue

Received Please switch to 'REGION-dialogflow.googleapis.com' to access resources located in 'REGION' response for API call, where REGION is a specific region ID.

Solution

This happens when you specify the region in the request, but not the endpoint. See one of the following for guidance:

Missing fields in the API call response

Agent type tags: Conversational Agents (Dialogflow CX), Dialogflow ES
Category tags: API

Issue

Some fields are missing in the API response.

Solution

If you expect a numeric value for a specific field in the API response, the field may be absent from the response if the returned value is 0.

For more information on the default value behavior (including non-numeric values), see:

Provide Complete Information to Support

When opening a support case with Cloud Support, include the relevant conversation IDs and logs collected during your investigation. This information is critical for debugging issues efficiently.