0

I want to perform live chat to Microsfot Azure chatbot using Botium-Box.

The connection to chatbot is made using Diectline3 connector successfully.

But the chatbot needs oauthAccessToken for conversation. Even I am able to send the Directline Secret key but chatbot needs authToken for communication.

So, what are the ways to send the oauthAccessToken to chatbot using directline3 connector ?

Mickaël Leger
  • 3,426
  • 2
  • 17
  • 36
Venkat
  • 1

1 Answers1

0

Botium has some options and hooks to include custom functionality. For adding some custom channelData to Directline activities, the UPDATE_CUSTOM logic hook can be used - add this to your convo file:

#me
blablabla text to send ...
UPDATE_CUSTOM SET_ACTIVITY_VALUE|channelData|{"oAuthToken": "my-token"}

Or, to load the token from a system environment variable:

#me
blablabla text to send ...
UPDATE_CUSTOM SET_ACTIVITY_VALUE|channelData|{"oAuthToken": "$func(process.env.MY_OAUTH_TOKEN)"}

With Botium Box 2.0 (scheduled for first week of november), it is also possible to make this UPDATE_CUSTOM logic hook global so you won't have to add this to all of your convo files.

More information available in the Github repository of the Botium Directline connector

Florian Treml
  • 1,315
  • 2
  • 7
  • 10