简体   繁体   中英

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.

Now, I have a public facing GET end point which I want to call from DialogAPI fulfillment

在此处输入图像描述

But it always fails with

"webhookStatus": { "code": 16, "message": "Webhook call failed. Error: UNAUTHENTICATED, State: URL_ERROR, Reason: ERROR_AUTHENTICATION, HTTP status code: 401." }

I cannot access the endpoint GET URL without any issues. For reference, this is the endpoint - 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. Any client application that uses the API must be authenticated and granted access to the requested resources.”

From the image you are sharing, you are missing an authorization method when you are trying to make the GET call. In this link, you can read how to achieve a proper authorization method in your API.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM