简体   繁体   English

有没有一种方法可以使我的程序将SMS发送到手机?

[英]There is a way to make my program send a SMS to a cellphone?

So, I want to implement a function om my C# program, basically what I want to do is find a way to make the program identify the computer which its being accessed so if a not authorize computer try to access it the program will not open. 因此,我想实现C#程序的功能,基本上我想做的就是找到一种方法,使程序识别正在访问其的计算机,因此,如果未经授权的计算机尝试访问该程序,则该程序将无法打开。

The way that I want to implement this is at the login screen the person that want to login will need to put their cellphone number and their password but if for some reason a person discover a functionary password and cellphone number and try to access the program with a computer that is not authorized to use the program the program will send a SMS to the functionary cellphone which they put and the person will need to put the aleatory code that will appear in the functionary cellphone, so basically I want to know how and if there is a way to do it, I am a noob with coding,but I appreciate any help. 我要实现此目的的方式是在登录屏幕上,要登录的人将需要输入他们的手机号码和密码,但是如果由于某种原因,一个人发现了实用的密码和手机号码,并尝试使用如果计算机未经授权使用该程序,则该程序会将SMS发送到他们放置的功能手机,而该人将需要输入将出现在功能手机中的偶然代码,所以基本上我想知道如何以及是否有一种方法可以做到,我是编码的新手,但我感谢您的帮助。 (sorry for any grammar errors or bad English) (对不起,语法错误或英语不好)

As far as I'm aware, C# does not have a built in way to send SMS. 据我所知,C#没有内置的发送SMS的方式。 But fear not, there is an online API you can use that is used by a good deal of big businesses. 但是不要担心,有很多大型企业都可以使用的在线API。 It's called Twilio , and they have a C# library you can access. 它称为Twilio ,并且它们具有您可以访问的C#库。 The only issue that one might have with it is that it does cost money to use their services. 一个人可能遇到的唯一问题是使用他们的服务确实要花钱。

Hope this helps! 希望这可以帮助!

Does it need to be an SMS? 需要短信吗? If not, you can use the Time-Based One-Time Password Algorithm to have one-time codes. 如果没有,则可以使用基于时间的一次性密码算法来获得一次性代码。 There are several .NET libraries available that provide this functionality. 几个提供此功能的.NET库

Depending on the cell provider, you can have your c# application send an email to a phone # and the recipient will see that message in their text conversations. 根据单元格提供商的不同,您可以让c#应用程序将电子邮件发送到电话#,收件人将在其文本对话中看到该消息。 I've done this with AT&T sending an email to phonenumber@mms.att.net . 我通过AT&T将电子邮件发送到phonenumber@mms.att.net来完成此操作。 Of course you will have to deal with different providers and how/if they accommodate this feature. 当然,您将不得不与不同的提供商打交道,以及他们如何/是否可以使用此功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM