Skip to content

Commit 32179f7

Browse files
FarhadJabiyevFarhad Jabiyev
andauthored
[Communication] - SMS - Messaging Connect (Azure#50335)
* Add Messaging Connect Support to .NET SDK --------- Co-authored-by: Farhad Jabiyev <[email protected]>
1 parent 36015f9 commit 32179f7

18 files changed

+263
-37
lines changed

sdk/communication/Azure.Communication.Sms/CHANGELOG.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
## 1.1.0-beta.3 (Unreleased)
44

55
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
6+
- Introduced Messaging Connect support in the .NET SDK.
7+
- Added a new MessagingConnect field to the SmsSendOptions model.
8+
- The MessagingConnect structure includes:
9+
- apiKey: used for authenticating Messaging Connect requests.
10+
- partner: identifies the Messaging Connect partner.
11+
- Supports:
12+
- Incoming and outgoing flows for long codes.
13+
- Outgoing flow for Dynamic Alpha Sender IDs (DASID).
1214

1315
## 1.1.0-beta.2 (2024-12-10)
1416

sdk/communication/Azure.Communication.Sms/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Console.WriteLine($"Sms id: {sendResult.MessageId}");
5656
```
5757
#### Send a 1:N SMS Message
5858
To send a SMS message to a list of recipients, call the `Send` or `SendAsync` function from the `SmsClient` with a list of recipient's phone numbers.
59-
You may also add pass in an options object to specify whether the delivery report should be enabled and set custom tags.
59+
You can also provide an options object to configure various settings, such as enabling the delivery report, adding custom tags, or specifying parameters for connecting with the Messaging Connect Partner to deliver SMS.
6060
```C# Snippet:Azure_Communication_SmsClient_Send_GroupSmsWithOptionsAsync
6161
var response = await smsClient.SendAsync(
6262
from: "<from-phone-number>", // Your E.164 formatted from phone number used to send SMS

sdk/communication/Azure.Communication.Sms/api/Azure.Communication.Sms.net8.0.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ internal AzureCommunicationSmsContext() { }
66
public static Azure.Communication.Sms.AzureCommunicationSmsContext Default { get { throw null; } }
77
protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; }
88
}
9+
public partial class MessagingConnectOptions
10+
{
11+
public MessagingConnectOptions(string apiKey, string partner) { }
12+
public string ApiKey { get { throw null; } }
13+
public string Partner { get { throw null; } }
14+
}
915
public partial class OptOutsClient
1016
{
1117
protected OptOutsClient() { }
@@ -31,18 +37,19 @@ public SmsClient(System.Uri endpoint, Azure.Core.TokenCredential tokenCredential
3137
}
3238
public partial class SmsClientOptions : Azure.Core.ClientOptions
3339
{
34-
public SmsClientOptions(Azure.Communication.Sms.SmsClientOptions.ServiceVersion version = Azure.Communication.Sms.SmsClientOptions.ServiceVersion.V2024_12_10_Preview) { }
40+
public SmsClientOptions(Azure.Communication.Sms.SmsClientOptions.ServiceVersion version = Azure.Communication.Sms.SmsClientOptions.ServiceVersion.V2025_05_29_Preview) { }
3541
public enum ServiceVersion
3642
{
3743
V2021_03_07 = 1,
38-
V2024_12_10_Preview = 2,
44+
V2025_05_29_Preview = 2,
3945
}
4046
}
4147
public partial class SmsSendOptions
4248
{
4349
public SmsSendOptions(bool enableDeliveryReport) { }
4450
public int? DeliveryReportTimeoutInSeconds { get { throw null; } set { } }
4551
public bool EnableDeliveryReport { get { throw null; } }
52+
public Azure.Communication.Sms.MessagingConnectOptions MessagingConnect { get { throw null; } set { } }
4653
public string Tag { get { throw null; } set { } }
4754
}
4855
public partial class SmsSendResult

sdk/communication/Azure.Communication.Sms/api/Azure.Communication.Sms.netstandard2.0.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ internal AzureCommunicationSmsContext() { }
66
public static Azure.Communication.Sms.AzureCommunicationSmsContext Default { get { throw null; } }
77
protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; }
88
}
9+
public partial class MessagingConnectOptions
10+
{
11+
public MessagingConnectOptions(string apiKey, string partner) { }
12+
public string ApiKey { get { throw null; } }
13+
public string Partner { get { throw null; } }
14+
}
915
public partial class OptOutsClient
1016
{
1117
protected OptOutsClient() { }
@@ -31,18 +37,19 @@ public SmsClient(System.Uri endpoint, Azure.Core.TokenCredential tokenCredential
3137
}
3238
public partial class SmsClientOptions : Azure.Core.ClientOptions
3339
{
34-
public SmsClientOptions(Azure.Communication.Sms.SmsClientOptions.ServiceVersion version = Azure.Communication.Sms.SmsClientOptions.ServiceVersion.V2024_12_10_Preview) { }
40+
public SmsClientOptions(Azure.Communication.Sms.SmsClientOptions.ServiceVersion version = Azure.Communication.Sms.SmsClientOptions.ServiceVersion.V2025_05_29_Preview) { }
3541
public enum ServiceVersion
3642
{
3743
V2021_03_07 = 1,
38-
V2024_12_10_Preview = 2,
44+
V2025_05_29_Preview = 2,
3945
}
4046
}
4147
public partial class SmsSendOptions
4248
{
4349
public SmsSendOptions(bool enableDeliveryReport) { }
4450
public int? DeliveryReportTimeoutInSeconds { get { throw null; } set { } }
4551
public bool EnableDeliveryReport { get { throw null; } }
52+
public Azure.Communication.Sms.MessagingConnectOptions MessagingConnect { get { throw null; } set { } }
4653
public string Tag { get { throw null; } set { } }
4754
}
4855
public partial class SmsSendResult

sdk/communication/Azure.Communication.Sms/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "net",
44
"TagPrefix": "net/communication/Azure.Communication.Sms",
5-
"Tag": "net/communication/Azure.Communication.Sms_d05ab98bcb"
5+
"Tag": "net/communication/Azure.Communication.Sms_3574f0bddf"
66
}

sdk/communication/Azure.Communication.Sms/samples/Sample1_SendSms.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ var response = smsClient.Send(
3838
options: new SmsSendOptions(enableDeliveryReport: true) // OPTIONAL
3939
{
4040
Tag = "marketing", // custom tags
41-
DeliveryReportTimeoutInSeconds = 90
41+
DeliveryReportTimeoutInSeconds = 90,
42+
MessagingConnect = new MessagingConnectOptions("PartnerApiKey", "PartnerName") // OPTIONAL
4243
});
4344
foreach (SmsSendResult result in response.Value)
4445
{

sdk/communication/Azure.Communication.Sms/src/Generated/Models/MessagingConnectOptions.Serialization.cs

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/Azure.Communication.Sms/src/Generated/Models/MessagingConnectOptions.cs

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/Azure.Communication.Sms/src/Generated/Models/SmsSendOptions.Serialization.cs

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/Azure.Communication.Sms/src/Generated/Models/SmsSendOptions.cs

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)