Closed ricew4ng closed 2 years ago
SMS
status_code = 200,但手机实际并没有收到短信。
代码:
func TestVolcSMS(t *testing.T) { phone := "15xxxxxxxx" code := "23414" sms.DefaultInstance.Client.SetAccessKey(AccessKeyID) sms.DefaultInstance.Client.SetSecretKey(AccessKeySecret) cj, _ := json.Marshal(Code{Code: code}) req := &sms.SmsRequest{ SmsAccount: "smsAccount", Sign: "sign", TemplateID: SmSTemplateID, TemplateParam: string(cj), PhoneNumbers: phone, Tag: "tag", } result, statusCode, err := sms.DefaultInstance.Send(req) t.Logf("[SMS] err: %v, send code(%s) to %s, result => %v, status_code => %v\n", err, code, phone, result, statusCode) }
结果:
SMS
status_code = 200,但手机实际并没有收到短信。
代码:
结果: