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

Adding a local path to Microsoft Face API by Python
finding minimum index of a list
extracting links with a specific class with Selenium in Python
Embedded extended python multiprocessing imports
Tweepy status deletion notice never occours
Scrapy return empty array
How to reindex pandas DataFrame with unicode indices?
In what circumstances are batch files the right approach? [closed]
Reading csv file and returning as dictionary
Send message to web skype group via a Guest account
Find max value and the corresponding column/index name in entire dataframe
ModbusTCP Server/Slave Implementatıon in Python (pymodbus)
Cannot stop program from crashing with wrong file entered by user
Python If Statment
How to use Async Task in django 1.10 to run in background?
flask: The requested URL was not found on this server

Categories

HOME
arrays
converter
ajax
jenkins-plugins
visual-studio-2013
d
mapbox-gl-js
orientation
console
algorithmic-trading
histogrammar
ext.net
metronic
criteria
wicket
ndis
flann
tee
activesync
ejs
redux-observable
jsonserializer
ejbca
tweets
jconsole
go-cd
bootstrap-typeahead
activepython
shopping-cart
hanami
rhmap
metis
excel-2013
upnp
polymorphism
modelandview
intellij-idea-2016
pytest-django
z3py
drawingarea
uiviewpropertyanimator
emoticons
autoresize
onresume
nsfetchedresultscontrolle
alter
spring-ioc
update-site
gameanalytics
zurb-foundation-apps
scalar
inet
flexjson
asymptote
insertion-sort
drf-nested-routers
oai
visual-studio-code
vine
harp
swift2.1
django-1.6
tilestache
temp-tables
libsndfile
ghostdoc
suffix-array
argument-passing
neoload
picat
pic24
lumx
healthvault
bignum
convex-polygon
manage.py
soa-suite
magickwand
device-emulation
dynamic-data
mvs
socketstream
n-layer
radchart
shim
getstring
gjs
msgbox
selectonemenu
noir
svn-hooks
requestfactory
msn
camtasia
boost-date-time
oggvorbis
microsoft.ink
associativity

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