Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

DialogFlow ES - API error geting agents

Alisys
New Member

Hi,

I've created an agent on "DialogFlow ES". The agent was called "AgenteEU2VideojuegosMadrid". We're using EU-WS region. Also, we connect the agent with "campus-videojuego-teya" project.

dialogflow_agent.png

But.. we can't access to this agent by API. We're trying to call it from Google Cloud Terminal.

request.json allocated on home/contratacionrequest.json allocated on home/contratacioncurl API errorcurl API error

We have created a service user. We have given all access to the user.

ia_permissions.png

Any idea?

Thanks!

0 1 233
1 REPLY 1

Hi @Alisys, the only way you can consume the external API for Dialogflow ES, is by using it with OAUTH2.0 protocol.

Mizar_0-1700142519116.png

 



https://cloud.google.com/dialogflow/es/docs/reference/rest/v2beta1/projects/getAgent
Kindly check
GET //
https://dialogflow.googleapis.com/v2beta1/projects/$projectid/agent

Authorization Bearer $oauth2.0Token

Also remember to create the auth token with the correct scope, also the refresh token.