Building a Chat System – Part 2


| May 9, 2023 | in

In my previous post, we discussed setting up an Ionic front end to host chat functionality in an app. In this post, we will discuss creating a user in Azure chat. We will then create a token that the front end can use to send messages as this user.

It is important to note that we want to generate this token on the backend, as we will be using Azure Chat. Generating this token should be pretty straightforward. We need to create a CommunicationIdentityClient.

We will use the CommunicationIdentityClient to create the user.

If we have an existing user, we just need to create an instance of the client using the user id.

Once we have created a user, you can create a token for this user. This token will allow the front end (Ionic) to interact with the Azure Chat service.

In my next post, we will store off some chat information in Azure Table storage. We must store something to make interacting with Azure Chat easier on the front end.

Related posts