How can I enable the dialogflow api automatically, I want to create a dialogflow agent using the api, but get an error:
google.api_core.exceptions.PermissionDenied: 403 Dialogflow API has not been used in project 79080971371 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/dialogflow.googleapis.com/overview?project=79080971371 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry
There is no way to automatically enable APIs in projects on Google developer console. There are some things in your project that need to be configured by you the developer.
You need to manually go to your project and then go to library and enable the API you are trying to access. In this case enable dialogflow api