![]() Additionally group 5 contains “contacts” and group 6 contains “opt-outs”. This parameter should contain the ID of the relevant group, which can found either within Messenger (in the “Reports” – “Advanced Reports” – “List of Group ID’s” section) or by running the get_groups command. This parameter can be used in place of the numbers parameter in order to send to an entire contact group. Maximum of 10,000 numbers and error code 33 will be returned if exceeded. You can create them in your Messenger Control Panel ( click here) for each application, and limit the usage of them by host IP Address.Ĭomma-delimited list of mobile numbers in international format (i.e. This can be used instead of the username/hash/password. Your secure hash can be found within Messenger in the main navigation under “ Help->All Documentation“.Īlternatively you can use the password parameter instead and use your Textlocal password in plain text. ![]() The email address used to log into Textlocal. The message also must be URL Encoded to support symbols like &. See Helpful Information for message length details. This parameter should be no longer than 918 characters. This must be at least 3 characters in length but no longer than 11 alphanumeric characters or 13 numeric characters. Use this field to specify the sender name for your message. Return CType(response, HttpWebResponse).StatusDescription Request.ContentType = "application/x-0, byteArray.Length)ĭim response As WebResponse = request.GetResponse()ĭataStream = response.GetResponseStream()ĭim reader As New StreamReader(dataStream)ĭim responseFromServer As String = reader.ReadToEnd() + "&message=" + WebUtility.UrlEncode(message) _ĭim request As WebRequest = WebRequest.Create(strPost)ĭim byteArray As Byte() = (strPost) URLConnection conn = url.openConnection() īufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream())) String data = "" + apiKey + numbers + message + sender String sender = "&sender=" + URLEncoder.encode("Jims Autos", "UTF-8") String message = "&message=" + URLEncoder.encode("This is your message", "UTF-8") String apiKey = "apikey=" + URLEncoder.encode("yourapiKey", "UTF-8") String data = apiKey + numbers + message + sender Ĭonn.setRequestProperty("Content-Length", Integer.toString(data.length())) Ĭonn.getOutputStream().write(data.getBytes("UTF-8")) įinal BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream())) įinal StringBuffer stringBuffer = new StringBuffer() HttpURLConnection conn = (HttpURLConnection) new URL("").openConnection() String sender = "&sender=" + "Jims Autos" String message = "&message=" + "This is your message" String apiKey = "apikey=" + "yourapiKey" Raise Exception.Create('Unable to initialize Wininet') UrlHandle := InternetOpenUrl(NetHandle, PChar(Url), nil, 0, INTERNET_FLAG_RELOAD, 0) NetHandle := InternetOpen('Delphi 5.x', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0) Using (StreamReader sr = new StreamReader(objResponse.GetResponseStream()))įunction getURLContent(const Url: string): string HttpWebResponse objResponse = (HttpWebResponse)objRequest.GetResponse() MyWriter = new StreamWriter(objRequest.GetRequestStream()) ObjRequest.ContentType = "application/x-www-form-urlencoded" HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url) refer to parameters to complete correct url string String url = "" + apiKey + "&numbers=" + numbers + "&message=" + message + "&sender=" + sender String numbers = "447123456789" // in a comma seperated list Status: " & wex.Status & "Message: " & wex.Message & "") Req.ContentType = "application/x-sr As New StreamReader(resp.GetResponseStream()) Sub Page_Load(sender As Object, e As EventArgs)ĭim Message As String = "This is an API message"ĭim PostData As String = "apikey=" & apikey & "&sender=" & SenderName & "&numbers=" & Number & "&message=" & Messageĭim req As HttpWebRequest = WebRequest.Create(URL)ĭim byte1 As Byte() = encoding.GetBytes(PostData)
0 Comments
Leave a Reply. |