待續。。網站app后台還未完成,不能添加簽名,短信不能正常發送。
Tip: https://help.aliyun.com/document_detail/55284.html?spm=5176.sms-account.0.0.63931cbeYBbL8t
1、創建阿里雲賬號
點擊阿里大於的官網:https://dayu.aliyun.com/
注冊賬戶后,進行實名認證(開通短信服務需要)。
找到管理控制台,選擇“短信服務”,然后進行以下操作
2、 獲取阿里雲訪問密鑰
https://usercenter.console.aliyun.com/#/manage/ak
3、在控制台完成模板與簽名的申請,獲得調用接口必備的參數
1)添加模板:
國內消息-->文本短信-->模版管理
https://help.aliyun.com/document_detail/55330.html?spm=5176.sms-account.103.7.1bf31cbegoZOOl
提交后,等待審核通過。
2)申請短信簽名,這步可以不設置(我自己的未通過。。)
國內消息-->文本短信-->簽名管理
https://help.aliyun.com/document_detail/55327.html?spm=a2c4g.11186623.6.555.4ab87b69QfaM0L
4、開發階段:
添加依賴:
<dependency> <groupId>com.aliyun</groupId> <artifactId>aliyun-java-sdk-core</artifactId> <version>4.0.6</version></dependency> <dependency> <groupId>com.aliyun</groupId> <artifactId>aliyun-java-sdk-dysmsapi</artifactId> <version>1.1.0</version> </dependency>