Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create dialogflow agent programmatically

Is there a way to programmatically create a new dialogflow agent programmatically?

I've done gcloud projects create [name] followed by gcloud services enable dialogflow.googleapis.com

I assumed this would be enough to use the projects.agent.import API but the API is giving an error:

Dialogflow API has not been used in project {REDACTED} before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/dialogflow.googleapis.com/overview?project={REDACTED} then retry.

Is there really no way to spin up a new project without interacting with the dialogflow console?

like image 953
Robert Levy Avatar asked Aug 24 '18 17:08

Robert Levy


2 Answers

According to new release you can now create agents with Rest API,

  1. https://cloud.google.com/dialogflow/docs/reference/rest/v2/projects/agent

For more info, Release Note of June 13, 2019

https://cloud.google.com/dialogflow/docs/release-notes

like image 140
Nikhil Savaliya Avatar answered Sep 20 '22 20:09

Nikhil Savaliya


You can now create and update agents with the API. See the REST and RPC documentation.

like image 35
Anthony V Avatar answered Sep 19 '22 20:09

Anthony V