[英]Dialogflow authentication API v2 - HTTP POST
I´m using dialogflow with http request on a project that works in twilio, with the recent need of migration to v2 API of dialogflow the client access token will not work.我在一个在 twilio 中工作的项目上使用带有 http 请求的对话流,最近需要迁移到对话流的 v2 API,客户端访问令牌将不起作用。 Reading the new authentication, I generated the json following the instructions in the google cloud docs, but can´t make it works.
阅读新的身份验证后,我按照谷歌云文档中的说明生成了 json,但无法使其正常工作。 Because I need to do all the interaction through POST requests to the dialogflow agent, does anyone know how I can generate the authentication token well?
因为我需要通过 POST 请求对 dialogflow 代理进行所有交互,所以有人知道我如何很好地生成身份验证令牌吗?
{
"error": {
"code": 401,
"message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
"status": "UNAUTHENTICATED"
}
}
Thanks谢谢
This is the function code that today works to make the http request.这是今天用来发出http请求的函数代码。 The problem is that all the services are in Twilio and i dont have access to the server, for that I cant define the environment variable.
问题是所有服务都在 Twilio 中,我无权访问服务器,因此我无法定义环境变量。
Twilio Function code Twilio 函数代码
Twilio Fuctions uses NodeJs and allow me to install many npm modules, with the following limitation: "Native Packages Not Supported - Functions does not provide a C/C++ compliler required to complie native addon modules. This means modules that depend on node-gyp can not be installed to Functions." Twilio Fuctions 使用 NodeJs 并允许我安装许多 npm 模块,但有以下限制:“不支持本机包 - Functions 不提供编译本机插件模块所需的 C/C++ 编译器。这意味着依赖于 node-gyp 的模块可以不能安装到 Functions 中。”
I don´t know if this limitations affect service acount working to me in this case.在这种情况下,我不知道此限制是否会影响对我工作的服务帐户。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.