Error: getaddrinfo ENOTFOUND dialogflow.googleapis.com

Hi @All
Right now I’m testing Dialogflow ES API V2 on Postman, I’m trying to query just the agent. In order to quick start.

When sending the request through Google site, I got the response

When trying Via postman I got this message.

I have already set up the OAuth 2.0 From Google Cloud side and Postman side.

Anyone has faced this issue?

Error: getaddrinfo ENOTFOUND dialogflow.googleapis.com

1 Like

Hi,

This is because you are missing the region. You have to contact the region at the beginning of the URL. For example: us-central1-dialogflow.googleapis.com

1 Like

hi @xavidop already tried with the region but look.

https://cloud.google.com/dialogflow/es/docs/reference/rest/v2beta1-overview#rest_endpoints

I’m using the default service endpoint

then Im using the resource

Im getting 200 from Google Doc

But still, postman is telling me the URL doesn’t exist.

p>404. That’s an error.

The requested URL /v2beta1/parent=projects/testbot-df/agent was not found on this server. That’s all we know.

yeah so the main issue I am seeing is that the URL is not correct, you have to specify the project id: the format is projects/ or projects//locations/.

make sure that the token it is not expired as well

Im creating the token each time when Im testing, and its working so fine.

For the project id is testbot-df

this is my URL, what could be the error here?https://dialogflow.googleapis.com/v2beta1/parent=projects/testbot-df/agent

try https://dialogflow.googleapis.com/v2beta1/testbot-df/agent

yes

That url is getting me the same result

I was doing with the parent=project/ due to this

https://cloud.google.com/dialogflow/es/docs/reference/rest/v2beta1/projects/getAgent?apix_params=%7B%22parent%22%3A%22projects%2Ftestbot-df%22%7D

try the URL I suggested with the region please

Any suggestions? I have billing enabled for this account and the id is working fine, the error is just the url but its the documentation url

this worked for me:

curl
‘[https://dialogflow.googleapis.com/v2/projects/test-cx-346408/agent?key=[YOUR_API_KEY](https://dialogflow.googleapis.com/v2/projects/test-cx-346408/agent?key=[YOUR_API_KEY)]’
–header ‘Authorization: Bearer [YOUR_ACCESS_TOKEN]’
–header ‘Accept: application/json’
–compressed

1 Like

and this JS code:

authorize and load
execute

Tried with the API key according to documentation but also, Documentation says that only OAUTH2.0 is the method to access.

Did you create the API from the project and add that to the api call ?

yes I did!

You can use API key & ouath token or just oauth token. Using only API token will not work

Im testing it, but would like to achieve it from Postman, like sending a request before to prepare a collection to call all methods

let me know your progress!! happy to assist!