Make sure you have installed the following tools.
- Download and install Python from here as per your supported OS.
- IDE (Integrated Development Environment) PyCharm.
optional
pip install Flask
pip install dialogflow
- In Dialogflow's console, go to settings ⚙ and under the general tab, you'll see the project ID section with a Google Cloud link to open the Google Cloud console. Open Google Cloud.
- In the Cloud console, go to the menu icon ☰ > APIs & Services > Credentials
- Under the menu icon ☰ > APIs & Services > Credentials > Create Credentials > Service Account Key.
- Under Create service account key, select New Service Account from the dropdown and enter. If you already have a service account key, select that.
- Give any name for the name and click Create. Give appropriate role.
- JSON file will be downloaded to your computer that you will need in the setup sections below.
- Inside root folder, replace the key.json in the credentials folder with your own credentials json file.
- In app.py, Change the GOOGLE_PROJECT_ID = "<YOUR_PROJECT_ID>" to your project ID