![](/img/trans.png)
[英]Authenticate Azure Email Communication Services using Service Principals in Python
[英]Azure Communication Services Simple SMS
ACS 新手,我只想發送一條 SMS 消息。 官方 MS 示例不起作用。 我收到 401 未經授權的錯誤。 我試過像示例一樣使用連接字符串構建客戶端,我試過使用 DefaultAzureCredential。 朝那個方向前進會導致未知錯誤。 有沒有人有任何建議如何讓 ACS SMS SendAsync 調用工作或讓我知道我做錯了什么?
確保將<from-phone-number>
設置為您之前使用電話號碼功能sms:PhoneNumberCapabilityType.Outbound
注冊的電話號碼。
var capabilities = new PhoneNumberCapabilities(sms:PhoneNumberCapabilityType.Outbound);
// ... register the phone number and use it in the following code:
SmsSendResult sendResult = smsClient.Send(
from: "<from-phone-number>",
to: "<to-phone-number>",
message: "Hello World via SMS"
);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.