通过 Twilio C# 库发出呼叫或短信请求是否始终使用 HTTPS?
Will making call or sms requests via the Twilio C# libraries always use HTTPS?
所以我有一些代码可以通过 Twilio 提供的 C#.Net 库调用 Twilio 网络 API。
private static void SendSMS(Shift_Offer so, Callout co, testdb2Entities5 db)
{
co.status = CalloutStatus.inprogress;
string ShMessage = getShiftMessage(so, co, db);
so.offer_timestamp = DateTime.Now;
string ServiceSID = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
var message = MessageResource.Create
(
body: ShMessage,
messagingServiceSid: ServiceSID,
to: new Twilio.Types.PhoneNumber(RCHStringHelpers.formatPhoneNumber(so.employee_phone_number)),
statusCallback: new Uri(TwilioCallBotController.SMSCallBackURL)
);
so.status = message.Status.ToString();
so.twillio_sid = message.Sid;
db.SaveChanges();
}
当我通过 C# 库将此消息请求发送到时,它会使用 HTTPS 发出请求吗?我担心以明文形式发送 SID。
我已经为 Dell 开发了 Twilio 集成。
他们在此处提供了一些源代码:
https://github.com/twilio/twilio-csharp
你可以在那里看到他们正在使用 HTTP
https://github.com/twilio/twilio-csharp/blob/master/src/Twilio/Http/SystemNetHttpClient.cs.
在戴尔,由于使用 HTTP 的安全问题,我需要基于他们的 REST API 创建自己的 Twilio 实现。
所以强烈建议大家自己开发,一定要使用HTTPS协议。
此处为 Twilio 开发人员布道师。
API 仅在 URL https://api.twilio.com
基础上通过 https 可用。此外,所有官方 Twilio 库(包括 C# 库)都默认设置为使用 https。
所以我有一些代码可以通过 Twilio 提供的 C#.Net 库调用 Twilio 网络 API。
private static void SendSMS(Shift_Offer so, Callout co, testdb2Entities5 db)
{
co.status = CalloutStatus.inprogress;
string ShMessage = getShiftMessage(so, co, db);
so.offer_timestamp = DateTime.Now;
string ServiceSID = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
var message = MessageResource.Create
(
body: ShMessage,
messagingServiceSid: ServiceSID,
to: new Twilio.Types.PhoneNumber(RCHStringHelpers.formatPhoneNumber(so.employee_phone_number)),
statusCallback: new Uri(TwilioCallBotController.SMSCallBackURL)
);
so.status = message.Status.ToString();
so.twillio_sid = message.Sid;
db.SaveChanges();
}
当我通过 C# 库将此消息请求发送到时,它会使用 HTTPS 发出请求吗?我担心以明文形式发送 SID。
我已经为 Dell 开发了 Twilio 集成。
他们在此处提供了一些源代码:
https://github.com/twilio/twilio-csharp
你可以在那里看到他们正在使用 HTTP
https://github.com/twilio/twilio-csharp/blob/master/src/Twilio/Http/SystemNetHttpClient.cs.
在戴尔,由于使用 HTTP 的安全问题,我需要基于他们的 REST API 创建自己的 Twilio 实现。
所以强烈建议大家自己开发,一定要使用HTTPS协议。
此处为 Twilio 开发人员布道师。
API 仅在 URL https://api.twilio.com
基础上通过 https 可用。此外,所有官方 Twilio 库(包括 C# 库)都默认设置为使用 https。