Ali cloud using SMS service interface provided to achieve SMS verification code

I write this article not because Ali cloud messaging study documents provided good service, but the use of documentation it provides for me this rookie first-time friendship is not enough, there are still many pits document does not say so. Record your own way bit by bit.

1. Using the steps Ali cloud interface

First, we log in aliyun official website
after the successful landing
Here Insert Picture Description
and then locate the SMS service
Here Insert Picture Description
screen after entering that Here Insert Picture Description
I am here, "management console" because I have opened for the first time when the opening should first open the service to the console management .
When the SMS service after you open the service console,
Here Insert Picture Description
you must first apply for signature
Here Insert Picture Description
and then you fill in some information after the application you have to wait about two hours to get signatures
second application is the template that you want users to send SMS templates
Here Insert Picture Description
that have pending review about two hours. . . .

When you apply all finished, the next step is to call the short message interface code to put your java code.
Now we find sample code
Here Insert Picture Description
Here Insert Picture Description
to decline after the jump to find
Here Insert Picture Description
we can first call to see what
Here Insert Picture Description
your code that uses it sent successfully, would like to achieve is to ctrl + C in your code, ctrl + V the
use Maven then introduced to jar package will be much simpler, there is the code

DefaultProfile profile = DefaultProfile.getProfile("default", "<accessKeyId>", "<accessSecret>");

Into your accessKeyId, accessSecret
show you
Here Insert Picture Description
Here Insert Picture Description

Guess you like

Origin blog.csdn.net/u012385160/article/details/91461962