How to get credentialsFile for Dialogflow NLU integration



I’m trying to set up the Dialogflow NLU integration (importing DialogflowNlu from package jovo-nlu-dialogflow) for the web platform.

I’m stuck trying to figure out what to use as the credentialsFile property.

The code goes like this:

const { DialogflowNlu } = require('jovo-nlu-dialogflow')
//... stuff
	new WebPlatform().use(
		new DialogflowNlu({
			credentialsFile: 'credentials.json'
	new Alexa(),
	new GoogleAssistant(),
	new JovoDebugger(),
	new FileDb()

Now, I’ve read somewhere in the Slack channels that credentials.json is supposed to be inside the src folder and that the credentialsFile property is the relative path to it.

What I have not found anywhere is an explanation or sample of what this file is supposed to look like, or instructions on where to get it from.

I found some help over Slack and was directed to these docs:

I’ve made it to this console

I tried using the Oauth2 client ID’s file downloaded from there, but ran into this error.

  Error -----------------------------------------------------------------
  No key or keyFile set.
  Error: No key or keyFile set.
      at GoogleToken.getTokenAsync (/Users/me/ws/my-project/node_modules/gtoken/build/src/index.js:125:19)
      at GoogleToken.getToken (/Users/me/ws/my-project/node_modules/gtoken/build/src/index.js:77:21)

To be clear, this is what this file looks like

	"web": {
		"client_id": "562***",
		"project_id": "myproject",
		"auth_uri": "",
		"token_uri": "",
		"auth_provider_x509_cert_url": "",
		"client_secret": "0lA***",
		"redirect_uris": [
		"javascript_origins": [

I don’t think this is the right file to use. If anyone has a sample they can mask and share, and instructions on where to get the file from, that would be great.


Hi @Miguelangel_Fernande,

This tutorial is a bit outdated, but it shows the steps necessary to create a service account and download its credentials file:


Thank you, @jan . This was very useful :slight_smile: