简体   繁体   English

Nexmo入站回调URL

[英]Nexmo inbound callback URL

I'm attempting to use Nexmo.com to send and receive text messages. 我正在尝试使用Nexmo.com发送和接收短信。 Sending works fine, but I am having some issues receiving messages. 发送工作正常,但接收消息时出现一些问题。

My issue is with the Callback URL and what format that page should be in. Nexmo's documentation is here and says this 我的问题是回调URL和该页面应采用的格式。Nexmo的文档在此处并说明了这一点

Inbound Message 入站邮件

If you have purchased long virtual numbers, you will need to set up a CallBack URL for inbound to which we will send a request for each incoming message. 如果您购买了很长的虚拟号码,则需要为呼入设置回叫URL,我们将向每条呼入消息发送请求。 Nexmo will be expecting response 200 OK, or it will retry. Nexmo将期望响应200 OK,否则将重试。

The request parameters sent via a GET (default) to your URL include the following parameters. 通过GET(默认)发送到您的URL的请求参数包括以下参数。

Am I missing something extremely simple? 我错过了一些非常简单的事情吗? Is there somewhere that I haven't found with an example of a Callback URL page? 回调URL页面示例在哪里找不到? Thanks for any help! 谢谢你的帮助!

Edit : For clarification, I'm using Nexmo's provided java library, but since their api is all built around URL's the java program simply visits a URL to send the message. 编辑 :为澄清起见,我使用的是Nexmo提供的Java库,但是由于它们的api都是围绕URL构建的,因此Java程序只需访问URL即可发送消息。 Here are their provided libraries 是他们提供的库

Not sure if I've understood your question. 不知道我是否理解您的问题。

Generally, if you want to receive messages, you have to setup a service on your server, with a callback url, say http://api.example.com/sms/ 通常,如果要接收消息,则必须在服务器上设置服务,并使用回调URL,例如http://api.example.com/sms/

Then you setup this callback url in Nexmo. 然后,您可以在Nexmo中设置此回调URL。 After that, Nexmo will access your server through the callback url, and send parameters via GET method. 之后,Nexmo将通过回调URL访问您的服务器,并通过GET方法发送参数。 And your server receives those info, and response 200 to Nexmo. 您的服务器会收到这些信息,并向Nexmo回复200。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM