Azure communication service integration with Azure bot service

Josie Li 1 Reputation point
2020-11-16T21:09:40.16+00:00

Hi there,

We are reviewing azure communication service integration with other azure components and saw this course on Ignite: DB121 - "Innovate with Azure Communication Services". In this course, it shows an example of how to integrate with azure bot service. There is some code to retrieve the chat bot(botIdentity) object then use its token to construct a ChatClient object and join the chat thread.

let botIdentityResponse = await axios.get(${apiEndpoint}/bot/getHelperBotIdentity)
let botIdentity = botIdentityResponse.data
// intialize chat client with token and get chat thread
let chatClient = new ChatClient(acsEndpoint, new AzueCommunicationUserCredetial(botIdentity.token))
let chatThreadClient = await chatClient.getChatThreadClient(message.threadId)

I searched up for this API "apiEndpoint}/bot/getHelperBotIdentity" and cannot find any Microsoft documentation around this API and also which endpoint the variable "apiEndpoint" is referring to? Could you please let me know where I can find some documentation about this API and its usage? Or is this API not published yet?

Thanks

Josie

Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
847 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Grmacjon-MSFT 17,886 Reputation points
    2020-11-18T18:24:15.343+00:00

    Hi @Josie Li and @Hyounwoo Sung ,

    Thanks for your patience. The sample code is being cleaned up and should be available soon but we currently don't have an ETA of when it will be ready. The APIs that you are pointing to are from the demo code and are not specific ACS APIS. You can assign a bot token/identity using the regular Auth APIs themselves.

    Here is a doc that explains the access tokens: https://video2.skills-academy.com/en-us/azure/communication-services/quickstarts/access-tokens?pivots=programming-language-csharp

    Hope that helps.

    -Grace

    2 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.