Can Oauth 2.0 be used with Watson Assistant WebHook?

Viewed 32

Within Watson Assistant WebHook setup, if the URL for the external API to be invoked from a dialog node requires Oauth 2.0 authentication can this level of authentication be supported from the WebHook using the header, and basic auth fields provided?

1 Answers

Not so easy at all, but still possible. You can use a Cloud Function (FaaS) to implement the OAuth 2.0. This function can provide you the token in the response and WA can save it into the context. Then, another webhook/function can access to WA context to get the token and use it within the header of the API Call. At this point, you could wonder why wouldn't be better to do the whole authentication phase into a single cloud function. Well, the point is that Functions must be quick and be able to executed within a certain amount of time before the timeout is triggered.

Related