DialogFlow v2 Access Token cannot generate

前端 未结 3 733
借酒劲吻你
借酒劲吻你 2021-01-14 01:42

With version 1 this is how I used to communicate with DialogFlow Api!

fetch(configs.baseUrl + \"query?v=20150910\", {
    body: JSON.stringify({query: text,          


        
3条回答
  •  感情败类
    2021-01-14 02:36

    You did pretty much the right thing, but you would probably want to use Dialogflows Node.js client SDK. These SDKs read the authentication JSON file automatically when you instantiate a client (see the example on Github, the file is read by ... = new dialogflow.SessionsClient()).

提交回复
热议问题