You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/communication-services/quickstarts/chat/quickstart-botframework-integration.md
+6-118Lines changed: 6 additions & 118 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,114 +171,15 @@ When you have a Communication Services resource, you can set up a Communication
171
171
172
172
Now that you have the bot's Communication Services ID, you can create a chat thread with the bot as a participant.
173
173
174
-
### Create a new C# application
174
+
### Follow the 'Add Chat to your app' quickstart
175
175
176
-
1. Run the following command to create a C# application:
176
+
Follow the steps in the [Add Chat to your app](/azure/communication-services/quickstarts/chat/get-started?pivots=programming-language-csharp) quickstart to create a chat app.
177
177
178
-
```console
179
-
dotnet new console -o ChatQuickstart
180
-
```
181
-
182
-
1. Change your directory to the new app folder and use the `dotnet build` command to compile your application:
183
-
184
-
```console
185
-
cd ChatQuickstart
186
-
dotnet build
187
-
```
188
-
189
-
### Install the package
190
-
191
-
Install the Communication Services Chat SDK for .NET:
192
-
193
-
```powershell
194
-
dotnet add package Azure.Communication.Chat
195
-
```
196
-
197
-
### Create a chat client
198
-
199
-
To create a chat client, use your Communication Services endpoint and the user access token you generated earlier. Use the `CommunicationIdentityClient` class from the Identity SDK to create a user and issue a token to pass to your chat client. Access tokens can be generated in the portal using the following [instructions](/azure/communication-services/quickstarts/identity/access-tokens).
200
-
201
-
Copy the following code and paste it in the *Program.cs* source file:
Use the `createChatThread` method on `chatClient` to create a chat thread. Replace the ID with the bot's Communication Services ID that you copied in this step: [Token and ACS Bot ID app](#get-a-communication-services-resource)
When you're finished using the chat thread, delete the thread:
278
-
279
-
```csharp
280
-
chatClient.DeleteChatThread(threadId);
281
-
```
180
+
1. Replace <Resource_Endpoint> with the Communication Services endpoint
181
+
1. Replace <Access_Token> with the user access token
182
+
1. Replace <Access_ID> with the bots ACS_ID
282
183
283
184
### Run the C# chat application locally
284
185
@@ -296,19 +197,6 @@ Example output:
296
197
1730405535010:Hello World
297
198
```
298
199
299
-
300
-
### Deploy the C# chat application (Optional)
301
-
302
-
If you have another web app service, you can deploy the chat application:
303
-
304
-
1. In Visual Studio, open the chat project.
305
-
306
-
1. Right-click the **ChatQuickstart** project and select **Publish**:
307
-
308
-
:::image type="content" source="./media/deploy-chat-application.png" alt-text="Screenshot that shows deploying the chat application to Azure from Visual Studio.":::
309
-
310
-
1. Once you publish the solution, run it and check if Echobot echoes the user message on the command prompt. Now that you have the solution you can proceed to play with the various activities that are needed for the business scenarios that you need to solve for.
311
-
312
200
## More things you can do with a bot
313
201
314
202
A bot can receive more than a plain-text message from a user in a Communications Services Chat channel. Some of the activities a bot can receive from a user include:
0 commit comments