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

Having trouble getting “more like this” to return any results in Haystack using Elastic Search backend
Linear interpolation within groups
Is it possible to turn a widget [Kivy]
Want to create a thumbnail(25,25) of an Image of size (181,256) using python
python code to get values from json data
Math domain error when trying to graph equation of circle with polar coordinates in python
Converting base 6 to decimal and vice versa in Python? [closed]
Labelling Segments in Turtle
How to test that functools.partial produces the expected function object
Django CreateView Auto Login
Dictionary comprehension to build list of lists: referencing the current value for a key during comprehension
Python:Errno 22 Invalid argument
Class initialisation issue python
Python def replace
How get back a proper json that was stored with fileInfo without the escape sequences?
django-admin.py not working properly in powershell

Categories

HOME
signalr
scipy
steam
extract
h2
sbt-assembly
quill
tumblr
google-classroom
packer
criteria
hosts
jboss7.x
google-shopping
cortex-a
intellij-plugin
qt-installer
equalizer
alfresco-share
ios10.3
prediction
os161
servicemix
iup
remove-method
cronet
auditing
superscript
apache-cloudstack
pyscripter
pdflatex
ifstream
phpspreadsheet
gettext
openshift-enterprise
color-scheme
mms
forecasting
concrete5-5.7
soundjs
intellilock
nsexception
productivity
estimation
onmouseover
rapidweaver
walmart-electrode
multi-agent
gmt
emgu
mongoose-populate
cron-task
firepath
dojox.charting
brython
image-editing
gmsmapview
gemini
android-recyclerview
asymptote
difference
anythingslider
jta
schtasks.exe
ninject.web.mvc
kendo-menu
rad
jericho-html-parser
sem
pyrocms
divide-by-zero
criteria-api
bridge
shift-jis
pl-i
ejabberd-saas
start-job
left-recursion
jquery-autocomplete
odftoolkit
sortable
node-imagemagick
boost-test
planetary.js
jstack
factors
mbox
roxygen
bignum
nservicebus4
dynamic-binding
sharpmap
graph-coloring
vertical-scrolling
mozart-mvc
usn
text-services-framework
objective-c-protocol
flash-cs5.5
querystringparameter
dcpu-16
server-error
out-of-browser
hibernate3-maven-plugin
communicationexception
economics
dotproject

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