DirectLine api for power virtual agent bot returns null as the conversatin id

142 views Asked by At

I am trying to communicate with a Bot built via Power Virtual Agent bot using the "Mobile App" channel as per connect to bot github code .

I am able to get the token allright but the line sometimes returns null

var conversation =  await directLineClient.Conversations.StartConversationAsync();

It is a Power Virtual Agent Bot that i am trying to connect to ...

2

There are 2 answers

0
punjabi On BEST ANSWER

rather than using token in directline constructor, I used the secret and its working fine now. In my case the code is C# running at server so using token isnt an issue thing will be complicated if you are using directline in client side and only option is token then

2
AP01 On

The Direct Line Connector package and the documentation you're using are quite outdated. You will find better success connecting to Direct Line through REST API calls, as described in the documentation for Direct Line v3.0.