How do I set up inbound SMS via HTTP?
Setting up your Vonage API account to receive SMS from your users.
- Inbound SMS
- HTTP Request
- Webhook URL
To receive an inbound SMS you need to:
- Buy a virtual number from Vonage for your market of interest.
- Set up a Webhook URL, either at the account level or on each individual number.
- We will forward every SMS you receive on the number to your Webhook URL.
Inbound Messages are sent using a GET or POST HTTP request to your Webhook URL. When you receive an inbound message, you must send a 200 OK response. If you do not send the 200 OK, Vonage resends the inbound message for the next 24 hours.
For details on what information you receive for every inbound SMS, see our SMS API Inbound messages developer documentation.
Can I use my inbound number to send SMS from? In other words, can I send an SMS from a number I purchased and have people reply to that same number (taking into account that my local market is Belgium and I'd be using a Swedish inbound number)?
Have a look at the reach list of inbound numbers and click on the Sweden list to see if Belgium is covered:
Hi Tony -
Belgium is indeed covered by Swedish numbers, but what I wanted to know is whether I can control that the SMSes sent from my app are being sent from that Swedish number, so that when a recipient replies, his reply is sent to my inbound number?
Currently, the SMS I sent are sent from a UK (+44) number, and I can't see how I can tell my app (or Nexmo for that matter) to send SMSes from the Swedish number I bought.
Response to Mathieu question via ticket: https://nexmo.zendesk.com/tickets/7513#/satisfaction
The response to Mathieu has been deleted or blocked? I have the same question as he had above, how do I get my texts to show up as coming from one of your virtual numbers so that i can have my application route it back to me
There's no global solution, you can receive inbound towards a UK, Swedish or Austrian numbers but we cannot ensure delivery when originating from those LVNs because of filtering issues. 2-way messaging is meant to work inside a given country US to US, UK to UK, ... depending where you are sending from you will need to set the originating number accordingly (or mention in the message content the reply number which is not ideal)
Yes I am trying to go USA to USA only, I just want to use a virtual number so that when a end user receives a text they can reply to it and it can get routed back to my number. Also when setting up a virtual number, which I have set up 2 of them on your system, when I setup the callback number I get an error:
"The configured URL is not responding" and when I send a text to my virtual numbers from my phone I get nothing?
As mentioned in the popup window your callback URL needs to respond with a 200 status to a method HEAD to make it's live.
I would recommend to share mode details with our HELP DESK email@example.com
Just to avoid any confusion here a "Callback URL" is an URL something like http://myserver.com/inbound where we can push the inbound message request (http://www.nexmo.com/documentation/index.html#mo) , this is not another phone number.
How I can get the number to send the sms to my number input virtual?
That is Nexmo parameter sends the callback url with the number that sent the SMS to long virtual number?
You will get the sender in the 'msisdn' parameter http://nexmo.com/documentation/index.html#mo
Hi guys, quick couple of questions
#1 - The documentation mentions a set of parameters for concatenated messages . I assume that this means we need to handle long messages compilation on our end, right? Nexmo will send individual parts in separate requests, correct? Any Best Practices regarding this, I'm mostly concerned about holding the parts until the message is complete, how long we should hold on to the parts, if you guarantee delivery, etc.
#2 - Is there any dev console were we can mock / try some requests? I know we can text ourselves once we have a public URL :) but it's a "Nice to have" I'm wondering about :)
Right, thanks guys
#1 this is correct you will get a request for each parts and it will be your responsibility to reconstruct the final message (the same way it's happening on the handset). All parts should arrive pretty much at the same time (maybe not in the right order), we guarantee delivery as long as we have received something from the carrier. You need to properly accept our inbound callback request (by responding with a 200 status) if not we will be retrying every minute for 24 hours.
#2 We don't have a sandbox as we speak, but we gave you some free credits for testing purpose (contact our helpdesk if you need more)
Please find a sample:
Gotcha, thank you for the quick reply Eric - we'll adjust development accordingly :)
For inbound messages, does Nexmo perform SMS STOP filtering? That is, does Nexmo intercept STOP, UNSUBSCRIBE, START, etc. inbound messages similar to Twilio (http://www.twilio.com/help/faq/sms/does-twilio-support-stop-block-and-cancel-aka-sms-filtering)?
We don't do keyword filtering on inbound messages, we give you full control by forwarding all messages to your server.
Then it is up to you to implement this logic.
Thanks for the prompt response, Eric. Appreciate it!
It appears that ONLY the callback URL set in the API Settings area applies. I have multiple numbers, and on two of them I have tried to set distinct callbacks for them on the Numbers page. The "Update" link next to the callback I set on the Numbers page generates a failure every time I try it, usually after many seconds. A pop-up complains that the configured URL is not responding.
If I copy-paste the URL from the Numbers page into my browser, the page does in fact respond with a 200 OK. And if I set either of these URLs on the API Settings page, the callbacks work properly. Unfortunately, only one of these can be effective at a time.
QUESTION: Do I only get to have a single callback across all the numbers purchased on my Nexmo account? At present the underlying apps are very different, and it would be somewhere between impractical and impossible to consolidate inbound-msg processing for these diverse apps.
You can set account level and number levels callback URL, please contact our support with your API key and the callback URL you are trying to set
Please sign in to leave a comment.