Search code examples
c#botframeworkdirect-line-botframework

Get token for given conversation ID


Let us assume :

  • An iframe embedded in a webpage for chatting with Bot.
  • Every time we refresh the page, a new conversation ID is assigned(c# bot solution with SDK's being used provided by microsoft. Microsoft Bot builder).
  • I need to get a token(secret) for the specific conversation ID mentioned above.
  • Note : we already have the conversation ID and Direct line secret on Azure, using these i need to get token to send messages to chat window asynchronously.

How do i get the token using Direct Line API 3.0, any ideas?


Solution

  • I have found a way to do the same,

    Please refer https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-send-and-receive-messages?view=azure-bot-service-3.0

    We need to make use of serviceUrl