Google's documentation is like an ocean. It's not easy to find a right one to start. This note contains only basic things that I've already worked with. Try your own hand at Google's APIs will help you understand more.

👉 Github repo: dinhanhthi/google-api-playground

<aside> ☝️ This note is mainly for Dialogflow APIs. However, I mention also the other services of Google.


Official documentation

Some services

<aside> ⚠️ When you use any NodeJS service, for example,

const client = new library.SampleClient(opts?: ClientOptions);

The opts is described here.


Wanna run the Node.js samples?{:#run-samples}

👉 Link of all (dialogflow nodejs) samples on github.

<aside> ⚠️ The old version uses dialogflow and @type/dialogflow. The new version uses only one @google-cloud/dialogflow!


<aside> ⚠️ On SDK documentation, they don't mention about the location in the parent property. For example, they say "parent can be projects/<Project ID or '-'>", but you can add the location information inside it like that

const parent = (location) => "projects/-" + "/locations/" + location;


<aside> ☝️ You have to enable the Dialogflow API in the current project. Other wise, we meet below problem.

7 PERMISSION_DENIED: Dialogflow API has not been used in project 284022294153 before or it is disabled. Enable it by visiting <> then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

You can use Service Usage to enable a service on some project programmatically or go to beflow url to active it visually,



Wanna try gapi (JS client)?

<aside> ⚠️ Google has announced that they will be discontinuing the Google Sign-In JavaScript Platform Library for web. You will have to switch to using Google Identity Services (or Sign In With Google or gsi). The old service will be completely discontinued on March 31, 2023.

<!-- OLD -->
<script src="<>" async defer></script>

<!-- NEW -->
<script src="<>" async defer></script>