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

Global event handlers in wxPython (Pheonix)
What does the Mayavi contour3d docs mean when it refers to “the arrows”?
Which python module is handy for simple 2-dimension graphic demonstration task?
Why does numpy.polyfit return non-zero values for straight line data?
AttributeError: 'FeatureChartParser' object has no attribute 'nbest_parse'
How to get type of the file from the Google Cloud Storage based on its blobkey?
Custom collections in SQL Alchemy
SqlAlchemy + MySql 1205, 'Lock wait timeout exceeded; try restarting transaction'
Getting the float numbers from this string (Python)
Django function calls
How do I limit the amount of values in a list - Python 3
While loops and duplicate code in python
egg package import error in python project deploy
Having trouble installing the Quartz python module
How to specify list size using FactoryBoy
Redirect a part of traffic to other server

Categories

HOME
security
pug
udp
websphere
filterrific
xamarin.android
fparsec
vs-team-services
qpython3
wms
command
h2
vlc
hyperledger-fabric
pygame
sudo
structuremap
aruco
keystore
mongodb-query
line-api
android-toolbar
ng-show
atlassian-plugin-sdk
jogl
autolayout
jquery-form-validator
os161
k2
header-files
source-maps
rworldmap
azure-servicebus-queues
npm-install
non-deterministic
sumo
mangodb
blackboard
gpib
helix-3d-toolkit
geo
npm-shrinkwrap
recurrence-relation
viewstate
bing-maps-api
es-shell
socketscan
code-composer
xbim
constants
android-maps-v2
ajp
lirc
recycle-bin
ideone
rollback
crystal-reports-8.5
in-memory-database
gradle-script-kotlin
slam-algorithm
gitweb
zurb-foundation-apps
linkageerror
dojox.charting
jackson-databind
clob
uwp-maps
string-parsing
elastix
loopj
galaxy
retro-computing
rspec3
c++-actor-framework
python-ggplot
tcpreplay
microblaze
java-collections-api
argument-passing
codeigniter-a3m
flash-cc
hamsterdb
modeshape
nservicebus4
swrl
stagefright
gridworld
google-closure-library
shortcuts
qss
pitch
radchart
caliper
parameterization
visual-web-gui
viewdidload
querystringparameter
datacontract
search-path
external-assemblies
gwt-2.2-celltable
boost-date-time
lazy-c++
msf
hardware-infrastructure

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