Textlocal没有向我的手机号码发送短信

时间:2020-02-05 15:45:56

标签: c# asp.net

protected void btnPhone_Click(object sender, EventArgs e)
{
    string destinationphone = "+65" + txtPhone.Text;
    string message = "HELP! Someone Has Fell Down At Home. Please Rush Home To Check It.";
    string message1 = HttpUtility.UrlDecode(message);

    using (var wb = new WebClient())
    {
        byte[] response = wb.UploadValues("https://api.txtlocal.com/send/?apikey=", new NameValueCollection()
        {
            {"apikey" , "cUgTLi57ieQ-cusJZXjMcFeLylqlZt105LVmuq6nTZ"},
            {"numbers" , destinationphone},
            {"message" , message1},
            {"sender", "TechSensor"}
        });
        string result = System.Text.Encoding.UTF8.GetString(response);
    }
}

这是我当前用于将SMS发送至某个号码的代码。但是,它对我不起作用。如果您以前使用过textlocal,请为我提供帮助。我没有在印度使用textlocal.in。

0 个答案:

没有答案