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

Passing user inputs directly in python
Django Generic Foreign Key Sorting
Python prime listing repetition bug
Summing values of a pandas data frame given a list of columns [duplicate]
Why is the top level package being removed? Python
List of objects function not working
multiple assignments in one line for loop python
selenium unicode encode error
Why npycharm telling me format is not an attribute of string
What is the MATLAB equivalent of a named tuple in Python?
Differences of scipy.spatial.KDTree in python 2.7 and 3.5
Getting correct exogenous least squares prediction in Python statsmodels
How can I merge two beautiful soup tags?
Python String Query
How to create and use multiple pipes within the same process with pexpect?
Python Error 24: too many files open: Per Process Limit?

Categories

HOME
sharepoint
jdbc
vue.js
signalr
windows-7
smartphone
orientation
httpclient
xcode8.3
dropbox
react-leaflet
eclipse-luna
medium-editor
uicollectionview
bar-chart
scenebuilder
flexlm
tweets
statusbar
iup
restfb
jquery-waypoints
non-deterministic
croppic
pipelinedb
mef2
pcre
transient
css-counter
oscommerce
color-scheme
redhat-datavirt
inkscape
android-download-manager
poco-libraries
initializer
delphi-10.1-berlin
visualstudio.testtools
wcf-security
wsadmin
web-development-server
resuming-training
amd
mod-fcgid
openweathermap
rdw
vcf
nstouchbar
web-deployment-project
jenkins-jira-trigger
livescribe
photography
infinite-scroll
opencpu
lotus
onresume
gulp-typescript
pspice
c64
spring-ioc
galleriffic
easing
webkit2
dojox.charting
uwp-maps
remoteapp
dac
enyo
mysqldumpslow
urn
connection-reset
ytplayerview
graphical-logo
ibm-data-studio
es2015
gmaps4rails
grunt-express
docopt
humanizer
delphi-xe3
installshield-2009
justgage
fortran77
phpsh
sequelpro
socketstream
qsqltablemodel
moq-3
getstring
windows-phone-7-emulator
file-exists
concurrent-programming
v4l
ajax.beginform
charts4j
goliath
libavformat
communicationexception
graniteds
system-codedom-compiler
handheld

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