Click here to Skip to main content
15,914,642 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi,
I have signed up for clickatell service to send sms. They have given me the following code for vb.net and said they do not know if this is right or wrong.

VB
Dim client As WebClient = New WebClient
    ' Add a user agent header in case the requested URI contains a query.
    client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)")
    client.QueryString.Add("user", "myusername")
    client.QueryString.Add("password", "mypwd")
    client.QueryString.Add("api_id", "myid")
    client.QueryString.Add("to", "009232XXXXXXX")
    client.QueryString.Add("text", "This is an example message using my vb.net code")
    Dim baseurl As String = "http://api.clickatell.com/http/sendmsg"
    Dim data As Stream = client.OpenRead(baseurl)
    Dim reader As StreamReader = New StreamReader(data)
    Dim s As String = reader.ReadToEnd()
    data.Close()
    reader.Close()
    Return


It returned no error but did not send sms too.
Please help.
Posted
Comments
Richard MacCutchan 12-Jan-14 11:38am    
Then you really need to ask Clickatell, it's their system.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900