This article is a mirror article of machine translation, please click here to jump to the original article.

View: 26994|Reply: 1

[Source] Java sends SMS verification codes through Alibaba Cloud SMS SDK

[Copy link]
Posted on 9/27/2021 9:22:26 AM | | | |
In the past, .NET/C# was used to send SMS, but today we use Java language to call Alibaba Cloud's SDK to realize the function of sending SMS verification codes.

Official documentation:The hyperlink login is visible.

Review:

.net/c# Alibaba Cloud SMS Mass Sending [Source Code]
https://www.itsvse.com/thread-4773-1-1.html

Alibaba Cloud SMS mass marketing promotion tool download
https://www.itsvse.com/thread-4721-1-1.html

Alibaba Cloud SMS Service sends promotional SMS messages in batches
https://www.itsvse.com/thread-3812-1-1.html

The SDK of the SMS service reports an exception: SDK.InvalidRegionId : Can not find endpoint to access.
https://www.itsvse.com/thread-3808-1-1.html

Alibaba is larger than marketing SMS batch sending [universal version] business version
https://www.itsvse.com/thread-3806-1-1.html

.net/c#
https://www.itsvse.com/thread-3533-1-1.html

.net/c# Yunpian Network marketing SMS batch mass messaging software
https://www.itsvse.com/thread-3532-1-1.html

.net/c# version of Bmob backend cloud marketing SMS mass sending [source code]
https://www.itsvse.com/thread-3530-1-1.html

Ali Da Yu (Ali Big Fish) Easy language SMS sending source code
https://www.itsvse.com/thread-3474-1-1.html

Bmob backend cloud SMS mass messaging .net/c# version demo
https://www.itsvse.com/thread-3289-1-1.html

c# Alibaba is greater than sending SMS demo source code download
https://www.itsvse.com/thread-3055-1-1.html

【Original】Ali Big Fish Batch Group SMS.net C# Personal Version
https://www.itsvse.com/thread-2835-1-1.html

Alibaba Big Fish sends a C# version demo via SMS
https://www.itsvse.com/thread-2651-1-1.html

Let's take a look at the renderings of successfully sending verification code SMS as follows:



First, you need to apply for accessKeyId and accessKeySecret in the Alibaba Cloud backend.

I Java is a maven project, which can be installed by POM file ingestion, as follows:

If you are using the upgraded SDK (dysmsapi20170525

Initialize the client with the following code:

I call the SendBatchSms interface to send SMS messages in batches, which supports sending SMS messages with different signatures to multiple different mobile phone numbers in a single request. Mobile phone number and other parameters are in JSON format, the number of fields is the same, one by one, the SMS service judges the signature sent to the specified mobile phone number according to the order of the fields in JSON, in a request,You can send up to 100 mobile numbersSend text messages separately.

API documentation:The hyperlink login is visible.

The code is as follows:

The call returns something successful:

{"headers":{"access-control-allow-origin":"*","date":"Mon, 27 Sep 2021 01:06:36 GMT","content-length":"110","access-control-max-age":"172800","x-acs-request-id":"xxx"," access-control-allow-headers":"X-Requested-With, X-Sequence, _aop_secret, _aop_signature","connection":"keep-alive","content-type":"application/json; charset=utf-8","access-control-allow-methods":"POST, GET, OPTIONS"},"body":{"code":"OK","message":"OK","bizId":"xxx^0","requestId":"xxx"}}


(End)





Previous:The difference between Expression<Func<T, bool>> and Func<T, bool> in EF
Next:The difference between VSphere, ESXi, and VCenter
Posted on 1/6/2022 7:41:01 PM |
Software support, import SMS phone numbers that have been successfully sent and mobile phone numbers that failed to be sent!!
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com