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

Compiled Python writing to Program Files
How to synchronize multiple django settings to the DB?
simulate pulling marbles from a bag without replacement (efficiently)
Datetime string doesn't match after strftime() and strptime()
Pandas HDFStore Tables doesn't accept multiindex columns
Two lists, if a common match is found print another list element [closed]
Is it possible to permanently change a variable inside a Python script from the same script?
Tweepy: simple script with 'Bad Authentication data' error
def function python - Help me with syntax
After the installion of django-bootstrap-toolkit, to use the css class in bootstrap, but it didn't work
Simple instructions for installing python easy_install on OSX
Python: Multiple conditions -in a pattern- for if/while
How to set timeout for ProxyAgent?
Combining data coordinates with pixel coordinates
Search/Find functionality in QTableView
is it possible to combine a logical and a limit condition in a numpy array slice operator

Categories

HOME
tensorflow
laravel-5
cakephp-3.x
ibm-watson-cognitive
filterrific
xamarin.android
textwatcher
windows-7
csvhelper
safari
branch.io
value
file-io
devstack
outlook-web-addins
xul
lstm
ssms-2016
scenebuilder
apache-karaf
attask
thumbnails
cython
apple-tv
bcrypt
logarithm
yosys
croppic
branch
web-frontend
datadog
pycparser
geomesa
hashcat
lego
oscommerce
readfile
concrete5-5.7
visualstudio.testtools
ddms
tango
rich-text-editor
catia
estimation
gauss
openh264
photography
in-memory-database
lotus
createobject
verbose
cleditor
glkit
chessboard.js
rstudio-server
django-filer
mercurial-hook
achievements
elastix
mpeg-4
selendroid
mptcp
rx-groovy
findcontrol
rspec3
web-component-tester
google-earth-plugin
pisa
django-1.6
rhel5
errorprovider
docopt
mov
io.js
mfmailcomposeviewcontroll
joox
lov
operations
visual-c++-2010-express
wic
cdata
layered
shiva3d
objcmongodb
device-emulation
template-haskell
git-filter-branch
objective-c-protocol
nssavepanel
wchar
coff
django-nose
rubycas
testunit
asp.net-mvc-controller
nt4
dirty-data
weborb
database-diagramming

Resources

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
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App