简体   繁体   English

DailogFlow API 对公共端点的履行给出未经授权的 401

[英]DailogFlow API fulfillment to public endpoint gives Unauthorized 401

I am new to this Dialog flow which I am using to try to connect my Google assistant with Salesforce based system.我是这个对话框流的新手,我用它来尝试将我的 Google 助手与基于 Salesforce 的系统连接起来。

Now, I have a public facing GET end point which I want to call from DialogAPI fulfillment现在,我有一个面向公众的 GET 端点,我想从 DialogAPI 实现中调用它

在此处输入图像描述

But it always fails with但它总是失败

"webhookStatus": { "code": 16, "message": "Webhook call failed. Error: UNAUTHENTICATED, State: URL_ERROR, Reason: ERROR_AUTHENTICATION, HTTP status code: 401." “webhookStatus”:{ “code”:16,“message”:“Webhook 调用失败。错误:未验证,State:URL_ERROR,原因:ERROR_AUTHENTICATION,HTTP 状态代码:401。” } }

I cannot access the endpoint GET URL without any issues.我无法毫无问题地访问端点 GET URL。 For reference, this is the endpoint - https://assistant-check-developer-edition.eu44.force.com/assistant/services/apexrest/Dialogflow作为参考,这是端点 - https://assistant-check-developer-edition.eu44.force.com/assistant/services/apexrest/Dialogflow

which just returns a string.它只返回一个字符串。

Can someone please help me what I am missing here?有人可以帮我这里缺少什么吗?

Thank you谢谢

From Google's documentation:来自谷歌的文档:

“If you plan to use the Dialog Flow API, you need to set up authentication. “如果您打算使用 Dialog Flow API,则需要设置身份验证。 Any client application that uses the API must be authenticated and granted access to the requested resources.”任何使用 API 的客户端应用程序都必须经过身份验证并被授予对请求资源的访问权限。”

From the image you are sharing, you are missing an authorization method when you are trying to make the GET call.从您共享的图像中,您在尝试进行 GET 调用时缺少授权方法。 In this link, you can read how to achieve a proper authorization method in your API.链接中,您可以阅读如何在 API 中实现正确的授权方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我可以在等待 Dailogflow ES 实现中的参数时获取用户输入文本吗? - Can I get the user input text while await parameters in Dailogflow ES fulfillment? Dialogflow 实现内联编辑器 api 请求 - Dialogflow fulfillment inline editor api request Dialogflow webhook 实现参数在 post API 中不起作用 - Dialogflow webhook fulfillment parameter is not working in post API dailogflow中数组中的最大元素 - Max element in an array in dailogflow Dialogflow 集成(使用实现 webhook model 与 API 交互模型) - Dialogflow Integrations (Using the fulfillment webhook model versus API interactions model) Dailogflow 帐户使用 webhook 取消链接 - Dailogflow account unlinking using webhook Dialogflow + 外部 API + Google Cloud Functions *无 * Firebase:如何返回履行响应? - Dialogflow + external API + Google Cloud Functions *without* Firebase: how to return fulfillment response? “dialogflow-fulfillment-nodejs”库是否仍在维护,或者我是否需要切换到“Dialogflow API:Node.js Client”库? - Is the "dialogflow-fulfillment-nodejs" library still maintained or do I need to switch to the "Dialogflow API: Node.js Client" library? Dialogflow Fulfillment - 多重意图 - Dialogflow Fulfillment - Mutiple Intents 如何在 dialogflow-fulfillment 的 API V2 中读取/查询响应正文? - How do you read/query the response body in API V2 of dialogflow-fulfillment?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM