如何通过API发送短信 [英] How to send sms through an API

查看:95
本文介绍了如何通过API发送短信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好先生

我有一个发送短信的API,例如
http://smsdynamic.co. in/sendsms?uname = yourUsername& pwd = yourPassword& senderid = yourSenderid& to = 9444xxxxxx& msg = yourMessage& route = yourRoute

因此,我正在传递参数并发送SMS.

但是,现在我将如何通过单击按钮使用它,上面的URL将触发,并且不会打开新的浏览器.它将在内部发送.


Hello Sir

I have an API of sending SMS like
http://smsdynamic.co.in/sendsms?uname=yourUsername&pwd=yourPassword&senderid=yourSenderid&to=9444xxxxxx&msg=yourMessage&route=yourRoute

So I am passing parameter and sending SMS.

But Now How I wll use it by click on a button, The above URL will fire and it will not open a new browser.It will send internally.


thanks.

推荐答案

http://smsdynamic.co.in/sendsms?uname=yourUsername&pwd=yourPassword&senderid=yourSenderid&to=9444xxxxxx& msg = yourMessage& route = yourRoute
根据此处显示的查询字符串,我将永远不会使用此API,但这就是我!

我将如何通过单击按钮使用它,上面的URL将被触发,并且不会打开新的浏览器.它将在内部发送
您无法避免打开新窗口-基本上,它会打开URL发送短信.因此,为了发送短信,必须执行url.如果上述网站确实希望其他人将其用作内部发送短信的API,则他们会公开提供服务,以便您可以在其中发布请求.
http://smsdynamic.co.in/sendsms?uname=yourUsername&pwd=yourPassword&senderid=yourSenderid&to=9444xxxxxx&msg=yourMessage&route=yourRoute
Based on the query strings shown here, I will never use this API, but that''s me!

How I wll use it by click on a button, The above URL will fire and it will not open a new browser.It will send internally
You cannot avoid opening of new window - basically it opens the URL to send the sms. So, in order to send sms, url has to be executed. If the above website really wants other to use it as an API to send sms internally, they would expose a service to do so where you can post your requests.


我们可以采用多种方法发送短信.这取决于提供程序提供的接口.

1. SMPP(使用简单的消息对等协议发送消息的最快方法)
2. HTTP接口(XML或直接的HTTP请求获取/发布)
3. FTP:我们需要编写文本文件,提供程序将逐行读取该文本文件并对其进行处理
There are various ways we can send SMS. It depends on the interface the provider gives.

1. SMPP ( Fastest way of sending messages using simple message peer to peer protocal)
2. HTTP interface (XML or direct http request get/post)
3. FTP: we need to write the text file the provider will read and process line by line


这篇关于如何通过API发送短信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆