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

python scipy load mat file error
How can i make a time counter using QTime()
How do I convert this string to an array with all the proper formatting? [duplicate]
Iterate through a static image folder in django
Python Sklearn import error for scaler, pdalda file error?
PyYAML YAML load_all to Objects (nicely)
ttf_lookup_cache attribute not found in FontManager when using plot()
How to sort keys of dict by values?
a data structure with key as a cluster of words and value as a single word or string
Disable python warnings only for specific module via commandline
Error running GAE tutorial code - Guestbook
How to create a running total- Python [closed]
Unbuffered Python Subrocess PIPE
Django runserver syntax error
How to parse the string into list of tuples
Make instance methods global in module?

Categories

HOME
python
jdbc
security
udp
payment-gateway
dynamics-crm
rotation
visual-studio-2013
google-contacts
fparsec
algorithmic-trading
xcode8.3
subquery
eclipse-cdt
packer
hashicorp-vault
finite-group-theory
informatica-powercenter
webmethods
datagrip
jquery-terminal
yeoman-generator
factor-analysis
google-openid
flexlm
thumbnails
rails-activerecord
binutils
rworldmap
myob
samsung-mobile
croppic
codelite
xilinx-ise
mayavi
google-api-dotnet-client
fileinfo
pep8-assembly
roundcube
vegan
crt
android-vpn-service
pace
npm-publish
cgo
intellij-idea-2016
nsexception
nashorn
html-agility-pack
median
cppunit
azure-availability-set
w3-total-cache
nsjsonserialization
defold
ti-basic
jgraph
spring-data-hadoop
jexl
photography
jcreator
onresume
backstop.js
gitweb
foxit
django-filer
asteriskami
squirrel
xmp
galaxy
license-key
mirrorlink
evo
futuretask
vine
mdm-zinc
adodb
musl
eclipse-classpath
ssms-addin
data-generation
dbsetup
circos
baucis
trimming
carddav
backbone-relational
mstsc
mozart-mvc
lync-server-2010
crocodoc
socketstream
blockingqueue
tfs-power-tools
gdt
hadoop-plugins
savestate
hmacsha1
odbc-sql-server-driver
divx





Mobile Apps Dev
Database Users
javascript
java
csharp
php
android


MS Developer
developer works
python
ios
c
html
jquery


RDBMS discuss