python


Nexmo Inbound SMS Processing in Python


I want to understand why this python-flask code doesn't work for processing an incoming message from nexmo. Pls let me know if there is something I'm missing here?
import nexmo
from flask import Flask
from flask import request
from flask import jsonify
client = nexmo.Client(key='xxxxx', secret='xxxxxxxx')
app = Flask(__name__)
#app.route("/sms")
def handler():
if request.args.get('type'):
print ("========Incoming Message=======")
print ("message from:", str(request.args.get('msisdn')))
print ("message data:", str(request.args.get('text')))
args = request.args.lists()
a = jsonify(args)
print a
return "", 200
else:
print ("=======Webhook Test=======")
return "",200
if __name__ == '__main__':
app.run(debug=True)
FYI, I'm able to see webhook test successful in the logs. But nothing seems to be coming in for the text messages sent from my phone number registered in nexmo nor from the text message sent from google voice number.


Related Links

Python Pandas: count unique values in row [duplicate]
Writing string list to a txt file, but the file is empty why?
Pass variables to Tornado base templates
Technology for visualization of geographical data. Python, matlab, Java [closed]
Very strange error while crawling
how to print the old result and the new result which makes the new result the old result
Fastest way to parse large CSV files in Pandas
python get index value and write text [duplicate]
print a column instead of list in python matrix
Migrating from Google App Engine Backends to Modules
How can I change the dpi of an image in PythonMagick?
Special kind of row-by-row multiplication of 2 sparse matrices in Python
itertools.product: how to improve the performance?
Accented Letters - Python 3.3 and Beautiful Soup 4 [Solved]
Max and Min of Frequency Both Returning Same Value
No module named admin.sites.urls

Categories

HOME
security
udp
websphere
nlp
filterrific
rotation
mapping
nuxeo
jbehave
extract
orientation
branch.io
yocto
actionscript-2
keystore
jboss-eap-7
xul
uiscrollview
ejbca
flexboxgrid
apple-tv
fop
tflearn
nmf
codelite
cgal
pygooglechart
ioc-container
hawtio
pljson
rhomobile
modulo
forecasting
readfile
axis-labels
intellilock
facebook-chatbot
openweathermap
timesten
chown
livescribe
xmgrace
component-pascal
volume
heroku-postgres
ingres
objloader
inject
dts
scalar
date-format
usb-drive
multinomial
asymptote
base32
integral
pyopengl
kendo-mvvm
node-imagemagick
firebug-lite
log4cplus
getimagedata
cppdepend
wss
initialization-vector
ksoap2
android-json-rpc
angulartics
confusion-matrix
nimrod
multiple-login
symfony-2.0
wcf-web-api
text-services-framework
signals2
maven-ant-tasks
hashalgorithm
curljs
cookieless
associative
loadui
chdatastructures
callgrind
handheld
economics
interface-design
rd





Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm