Skip to content

Commit c3069f6

Browse files
committed
review issues
1 parent 7586b95 commit c3069f6

File tree

4 files changed

+69
-2
lines changed

4 files changed

+69
-2
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
title: Include file
3+
description: Include file
4+
services: azure-communication-services
5+
author: shamkh
6+
ms.service: azure-communication-services
7+
ms.subservice: advanced-messaging
8+
ms.date: 07/15/2024
9+
ms.topic: include
10+
ms.custom: include file
11+
ms.author: shamkh
12+
ms.custom: devx-track-extended-java, devx-track-js, devx-track-python
13+
zone_pivot_groups: acs-js-csharp-java-python
14+
---
15+
16+
### Authenticate the client
17+
18+
The Messages SDK uses the `NotificationMessagesClient` to send messages. The `NotificationMessagesClient` method authenticates using your connection string acquired from Azure Communication Services resource in the Azure portal. For more information about connection strings, see [access-your-connection-strings-and-service-endpoints](../../../create-communication-resource.md#access-your-connection-strings-and-service-endpoints).
19+
20+
[!INCLUDE [Authenticate the client ](./authenticate-notification-messages-client-net.md)]
21+
22+
### Set channel registration ID
23+
24+
You created the Channel Registration ID GUID during [channel registration](../connect-whatsapp-business-account.md). Find it in the portal on the **Channels** tab of your Azure Communication Services resource.
25+
26+
:::image type="content" source="../media/get-started/get-messages-channel-id.png" lightbox="../media/get-started/get-messages-channel-id.png" alt-text="Screenshot that shows an Azure Communication Services resource in the Azure portal, viewing the 'Channels' tab. Attention is placed on the copy action of the 'Channel ID' field.":::
27+
28+
Assign it to a variable called channelRegistrationId.
29+
```csharp
30+
var channelRegistrationId = new Guid("<your channel registration ID GUID>");
31+
```
32+
33+
### Set recipient list
34+
35+
You need to supply an active phone number associated with a WhatsApp account. This WhatsApp account receives the template, text, and media messages sent in this quickstart.
36+
37+
For this example, you can use your personal phone number.
38+
39+
The recipient phone number can't be the business phone number (Sender ID) associated with the WhatsApp channel registration. The Sender ID appears as the sender of the text and media messages sent to the recipient.
40+
41+
The phone number must include the country code. For more information about phone number formatting, see WhatsApp documentation for [Phone Number Formats](https://developers.facebook.com/docs/whatsapp/cloud-api/reference/phone-numbers#phone-number-formats).
42+
43+
> [!NOTE]
44+
> Only one phone number is currently supported in the recipient list.
45+
46+
Create the recipient list like this:
47+
```csharp
48+
var recipientList = new List<string> { "<to WhatsApp phone number>" };
49+
```
50+
51+
Example:
52+
```csharp
53+
// Example only
54+
var recipientList = new List<string> { "+14255550199" };
55+
```
56+
57+
### Start sending messages between a business and a WhatsApp user
58+
59+
Conversations between a WhatsApp Business Account and a WhatsApp user can be initiated in one of two ways:
60+
- The business sends a template message to the WhatsApp user.
61+
- The WhatsApp user sends any message to the business number.
62+
63+
A business can't initiate an interactive conversation. A business can only send an interactive message after receiving a message from the user. The business can only send interactive messages to the user during the active conversation. Once the 24 hour conversation window expires, only the user can restart the interactive conversation. For more information about conversations, see the definition at [WhatsApp Business Platform](https://developers.facebook.com/docs/whatsapp/pricing#conversations).
64+
65+
To initiate an interactive conversation from your personal WhatsApp account, send a message to your business number (Sender ID).
66+
67+
:::image type="content" source="../media/get-started/user-initiated-conversation.png" lightbox="../media/get-started/user-initiated-conversation.png" alt-text="A WhatsApp conversation viewed on the web showing a user message sent to the WhatsApp Business Account number.":::

articles/communication-services/quickstarts/advanced-messaging/whatsapp/includes/download-media/download-media-net.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Follow these steps to add required code snippets to the messages-quickstart.py p
4040
- [Set channel registration ID](#set-channel-registration-id)
4141
- [Set recipient list](#set-recipient-list)
4242

43-
[!INCLUDE [Common setting for using Advanced Messages SDK](../common-setting.md)]
43+
[!INCLUDE [Common setting for using Advanced Messages SDK](../common-setting-net.md)]
4444

4545
## Code examples
4646

articles/communication-services/quickstarts/advanced-messaging/whatsapp/includes/get-started/messages-get-started-net.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Follow these steps to add required code snippets to the messages-quickstart.py p
4545
- [Set recipient list](#set-recipient-list).
4646
- [Start sending messages between a business and a WhatsApp user](#start-sending-messages-between-a-business-and-a-whatsapp-user).
4747

48-
[!INCLUDE [Common setting for using Advanced Messages SDK](../common-setting.md)]
48+
[!INCLUDE [Common setting for using Advanced Messages SDK](../common-setting-net.md)]
4949

5050
## Code examples
5151

0 commit comments

Comments
 (0)