手机号黑名单管理
更新时间:2023-07-19
新增手机号黑名单
通过以下代码,可以新增手机号黑名单
err := client.CreateMobileBlack(&api.CreateMobileBlackArgs{
Type: "SignatureBlack",
SmsType: "CommonNotice",
SignatureIdStr: "sddd",
Phone: "12345678901",
})
if err != nil {
fmt.Printf("CreateMobileBlack error, %s", err)
return
}
fmt.Printf("CreateMobileBlack success")
查询手机号黑名单
通过以下代码,可以新增手机号黑名单
res, err := client.GetMobileBlack(&api.GetMobileBlackArgs{
SmsType: "CommonNotice",
SignatureIdStr: "sddd",
Phone: "12345678901",
StartTime: "2023-07-18",
EndTime: "2023-07-19",
PageNo: "1",
PageSize: "10",
})
if err != nil {
fmt.Printf("GetMobileBlack error, %s", err)
return
}
fmt.Printf("GetMobileBlack success. %s", res)
删除手机号黑名单
通过以下代码,可以删除手机号黑名单
err := client.DeleteMobileBlack(&api.DeleteMobileBlackArgs{
Phones: "12345678901",
})
if err != nil {
fmt.Printf("DeleteMobileBlack error, %s", err)
return
}
fmt.Printf("DeleteMobileBlack success")