1

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

enter image description here

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

Kaushik Ray
  • 555
  • 2
  • 8
  • 21
  • Have you created your custom webhook code or you are using the inline editor of the Dialogflow? I think for the inline editor then you can not make it using the Dialogflow inline editor. https://stackoverflow.com/questions/53431544/how-to-make-3rd-party-api-call-in-dialogflows-inline-editor. (Note: Please have a look in the GCP logging for more info why it's showing the 401?) – Dhruv Rajkotia Dec 13 '21 at 12:21
  • Hi @DhruvRajkotia, I am not using the inline editor and directly adding the public endpoint. I added an image to the question – Kaushik Ray Dec 13 '21 at 14:05
  • did this ever get fixed? – Dan Feb 17 '22 at 21:49

1 Answers1

0

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.

Eduardo Ortiz
  • 715
  • 3
  • 14