简体   繁体   English

如何从Java Web应用程序发送SMS消息

[英]How to send SMS messages from a Java Web Application

I need to implement a use case in which I need to auto-generate message to a new user to verify his mobile number by asking him to enter a number sent to his mobile in an SMS. 我需要实现一个用例,在该用例中,我需要自动生成发给新用户的消息,以要求他输入通过SMS发送给他的手机的号码来验证他的手机号码。

Does Spring Framework provide any integration support to implement such a use case? Spring Framework是否提供任何集成支持来实现这种用例?

Could someone suggest me how to do that? 有人可以建议我该怎么做吗?

Any suggestions are appreciated. 任何建议表示赞赏。

Thanks. 谢谢。

Sending SMS messages requires a gateway provider, eg Clickatell or Twilio or whatever. 发送SMS消息需要网关提供商,例如Clickatell或Twilio或其他。 You then implement that provider's SDK to send messages. 然后,您实现该提供程序的SDK来发送消息。

It costs about $5k to setup a short code, and about $1500 per month to maintain it. 设置短代码的费用约为5,000美元,维护该代码的费用约为每月1500美元。 Some providers, like Twilio, let you share a development short code for sending messages, but you can't receive any. 某些提供商,例如Twilio,可以让您共享用于发送消息的开发短代码,但您什么也收不到。

What I've done for verification is send a message via email to a phone, asking for the phone number and the provider. 我所做的验证工作是通过电子邮件将消息发送到电话,询问电话号码和提供者。 Then convert that into the phone's email address, eg 9785551234@vtext.com. 然后将其转换为电话的电子邮件地址,例如9785551234@vtext.com。

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

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