Verizon API Rest sms posts

Here is how I figured out how to use Verizons API to send SMS messages.
http://developer.verizon.com/content/vdc/en/verizon-tools-apis/verizon_apis/network-api-direct-development/napi-tutorials/rest.html
 
 
http://developer.verizon.com/content/vdc/en/verizon-tools-apis/verizon_apis/network-api-direct-development/networkapi_api_reference/napi_sms_api_reference/api-reference-send-sms.html
Request
POST
/rest/sms/messages
{
“addresses”: [“tel:1112224444”],
“senderName”: “tel:600000001040”,
“message”: “test message”,
“receiptRequest”:
{
“endpoint”:”http://<ipaddress>:<port>/<resourename>”,
“interfaceName”:”notifySmsDeliveryReceipt”,
“correlator”: “test”
}
}
curl -u username:password -i -H “Content-Type: application/json” -H “com.bea.wlcp.wlng.plugin.sms.RequestDeliveryReportFlag:true” -d {“addresses”: [“tel:1112224444″],”senderName”: “tel:600000001040″,”message”: “test message”,”receiptRequest”: {“endpoint”:”http://<ipaddress>:<port>/<resourename>”,”interfaceName”:”notifySmsDeliveryReceipt”,”correlator”: “test”}} https://cert.verizoncert.com/rest/sms/messages
Response
{“result”: “FDA_210_310^30894532117101-1344157303”}
http://developer.verizon.com/content/vdc/en/verizon-tools-apis/verizon_apis/network-api/napi_dev_tools_livedemo1/napi_tools_livedemo_sendsms.html
 
URL: https://sim.verizoncert.com/rest/sms/messages

Method: POST

Body:

{
“addresses”:[“tel:INSERT_ADDRESS_HERE”],
“message”:”Hello, from the Basic Demo.”,
“senderName”:”tel:INSERT_SMS_SAN_HERE”
}

http://developer.verizon.com/content/vdc/en/verizon-tools-apis/verizon_apis/network-api-direct-development/napi-tutorials/rest.html
 
curl -u james.culbreath:H7x3hYyG7 -i -H “Content-Type: application/json” -H “com.bea.wlcp.wlng.plugin.sms.RequestDeliveryReportFlag:true” -d {“addresses”: [“tel:8013806363″],”senderName”: “tel:651998955296″,”message”: “test message”}} https://sim.verizoncert.com/rest/sms/messages

curl -i -H “Content-Type: application/json” -X POST -u username:password -k -d ‘{“addresses”:[“tel:8013806363“],”senderName”:”tel:651998955296“, “message”:”hi”}’ https://sim.verizoncert.com/rest/sms/messages 

 
[weasy@weasy ~]$ curl -i -H “Content-Type: application/json” -X POST -u myusername:passwordhere -k -d ‘{“addresses”:[“tel:8013806363″],”senderName”:”tel:651998955296″, “message”:”hi”}’ https://sim.verizoncert.com/rest/sms/messages
 
HTTP/1.1 200 OK
Cache-Control: no-cache=”Set-Cookie”
Date: Sat, 13 Sep 2014 03:58:51 GMT
Location: https://sim.verizoncert.com/rest/sms/delivery-status/SEWA71MA_ES^15434451632814-205141892
Content-Length: 49
Content-Type: application/json
Set-Cookie: _WL_AUTHCOOKIE_JSESSIONID=bHxMkjGF5sFpwuwErG[g; path=/; secure
X-Powered-By: Servlet/2.5 JSP/2.1

jim has written 83 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>