0

Our frontend javascript code calling Dialogflow V1 APIs has been working great inside web frontend javascript file such as Main.js and not in Index.js. Now we need to replace V1 APIs with V2 APIs;

But, our researches show that lots of sample code to call V2 APIs are placed in Node Index.js such as the following code and the following tutorial: https://medium.com/@tzahi/how-to-setup-dialogflow-v2-authentication-programmatically-with-node-js-b37fa4815d89

// Instantiate a DialogFlow client.

const dialogflow = require('dialogflow');

const sessionClient = new dialogflow.SessionsClient({

 projectId,

  keyFilename: credentials_file_path,

});

My researches results below answered some of my Q on this. The following posts show this point:

Dialogflow V2 APIs forced web apps to call its APIs through server code such as Node Index.js and not from Ajax call. https://stackoverflow.com/questions/50627057/how-to-make-http-call-on-dialogflow-v2-using-javascript-ajax-call

https://stackoverflow.com/questions/50633291/how-can-i-make-http-call-to-dialogflow-v2-using-simple-ajax-jquery?rq=1

But the above posts are around one year ago. I wish to verify this point: Does the current Dialogflow V2 APIs have the same requirements as the above?

Any thoughts and suggestions on this will be appreciated. Thank you in advance!

eGlobeBiz
  • 87
  • 1
  • 10

0 Answers0