4

I'm attempting to use Nexmo.com to send and receive text messages. 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

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. Nexmo will be expecting response 200 OK, or it will retry.

The request parameters sent via a GET (default) to your URL include the following parameters.

Am I missing something extremely simple? Is there somewhere that I haven't found with an example of a Callback URL page? 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. Here are their provided libraries

George Stocker
  • 57,289
  • 29
  • 176
  • 237
Patrick
  • 143
  • 2
  • 8
  • 1
    Can you specify the programing languages or library you're using? – weakish Sep 14 '12 at 08:36
  • Is inbound works as same like DLR. My callback is not received any param. I set callback in nexmo. I don't know where to use virtual number while sending sms. Should i need to do that? Is nexo will automactically realize when someone reply to the sms and will trigger the callback.. Not sure how it works. If someone explain it, will be very useful – Gowri Jan 30 '14 at 17:44

1 Answers1

5

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/

Then you setup this callback url in Nexmo. After that, Nexmo will access your server through the callback url, and send parameters via GET method. And your server receives those info, and response 200 to Nexmo.

weakish
  • 28,682
  • 5
  • 48
  • 60
  • I added clarification as to what language I was using in the original post, but I think you're right in this answer. Is there a specific format that the page the callback URL links to should have? – Patrick Sep 14 '12 at 14:14
  • @Etag No specific format, it just sends the message with the data as a query string or a `POST` with form data and expects a `200` response. – Tim Lytle Sep 14 '12 at 15:00
  • I'm using ruby on rails and I'm having the same confusion. I have the callback url as htt://www.app/receive_text set up in nexmo and I have a route with the url pointing to a controller to handle the response. But I don't seem to get anything...am I suppose to explicitly respond with a 200?? Any help would be appreciated. – justcode Jan 15 '14 at 22:49
  • 1
    I too do not receive any response. Nexmo don't seem to be loading my callback url at all after I text one of the numbers I purchased. – Jack Aug 20 '16 at 09:18
  • same here, bought a number, set the webhook, sent sms to said number, but webhook not triggered – fersarr Jan 28 '20 at 21:44