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

Reassign rows and columns in Python csv
How to check raw_input answers inside if-statements
how does one define a nullary function in python?
Sympy, plotting geometric entities yields either ImportError: no module named 'plot' or AttributeError: 'Circle' object has no attribute 'is_3D'
Select first row that meets certain condition
Splitting longer patterns using regex without losing characters Python 3+
Using python sdist to create a package that includes generated files in the build directory
Any elegant way to add a method to an existing object in python?
Setting cookies for static files using bottle.py
Python/Feedparser: reading RSS feed fails
How to generate a Torrent Magnet URI from a directory?
Python/Kivy camera widget error with opencv
Python3 - When exactly do you need to prepend “self._” to variable declarations within class methods? [duplicate]
how to tell python 3 to skip over non-digit characters from a csv file
writing numpy codes in cython with unknown dimensions
How to refresh django connection when inserting in SQL

Categories

HOME
laravel-5
cluster-computing
plsql
puzzle
blockchain
facebook-graph-api
deep-linking
adsense
devstack
onenote-api
criteria
nixos
game-physics
dlib
gwtp
phoenix
riak
r-lavaan
alfresco-share
linq-to-sql
ejbca
epicor
go-cd
tfs2013
croppic
upnp
edge-detection
cell-array
vegan
npm-shrinkwrap
jquery-cycle2
google-guava-cache
vmd
initializer
flex4.5
bing-translator-api
constants
tango
intersystems-ensemble
mod-fcgid
facebook-chatbot
rapidweaver
jtds
livescribe
jgraph
jszip
selenium-firefoxdriver
qos
gradle-script-kotlin
libreadline
rstudio-server
kendo-combobox
multilingual-app-toolkit
cmocka
hateoas
geodjango
pgm
ctrlp
chaining
fragment-tab-host
neoload
colt
initialization-vector
edit-in-place
visual-c++-2010-express
nimrod
dynamic-binding
carddav
qtgui
mozart-mvc
feof
n-layer
file-exists
signals2
law-of-demeter
mysql-error-1045
email-spec
post-redirect-get
drawtext
google-instant
revision
hmacsha1
configurable
data-execution-prevention

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