Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SendMessageDemo.java #523

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions examples/SendMessageDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@
public class SendMessageDemo {
public static void main(String args[]) {
// 设置需要操作的账号的AK和SK
String ACCESS_KEY = "";
String SECRET_KEY = "";
String ACCESS_KEY = "fv8Pft_71sLxh6AN-EqDt7QSa1J_wt5y3yTGGhCW";
String SECRET_KEY = "rb3bIUxBKm6aEYGMW_cfpBVMdy-QDPeP_VuObmtV";
Auth auth = Auth.create(ACCESS_KEY, SECRET_KEY);

// 实例化一个SmsManager对象
SmsManager smsManager = new SmsManager(auth);

try {
Map<String, String> map = new HashMap<String, String>();
Response resp = smsManager.sendMessage("templateId", new String[] { "10086" }, map);
map.put("p1",name);
map.put("p2",time);
map.put("p3",place);
map.put("templateId","1386991105744056320");
Response resp = smsManager.sendMessage("1386991105744056320", new String[] { "15859288526" }, map);
// Response resp = smsManager.describeSignature("passed", 0, 0);
// Response resp = smsManager.createSignature("signature", "app",
// new String[] { "data:image/gif;base64,xxxxxxxxxx" });
Expand Down