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

how to store yield request responses on scrapy
python sklearn non linear svm penalty
builtins.TypeError: __init__() missing 2 required positional arguments: 'height' and 'radius'
How to do a reverse operation to tf.nn.embedding_lookup?
django complex query for interdependant tables
Is there a more efficient and elegant way to filter pandas index by date?
How do I temporarily use Python 3.6 in terminal Mac?
Difference between pre-trained word embedding and training word embedding in keras
AttributeError: module 'xlwings' has no attribute 'save'
Images broadcast over UDP socket (Python)
Index class as list and as dictionary
Python “will the arrow fly straight program”
Processing an eventlog with Pandas - find next match in DataFrame
Intellij python plugin debugging the script copied under the target directory
Create a list with repeated values with list comprehension
Is LASSO regression implemented in Statsmodels?

Categories

HOME
ssas-2012
jsviews
uibutton
wxwidgets
reportportal
computer-vision
zend-framework2
javamail
ios10
filter
vsftpd
i2c
dropbox
constructor
xamarin-studio
nixos
wordpress-theming
ctypes
cs-cart
squarespace
postmessage
jquery-terminal
alfresco-share
jcl
deb
thingsboard
jquery-scrollify
katharsis
image-quality
unpack
mangodb
configure
ioc-container
polymorphism
geo
geopy
body-parser
css-counter
es-shell
parse-android-sdk
declare
silverlight-3.0
polyfills
resuming-training
encapsulation
defold
gd
uiviewpropertyanimator
web-deployment-project
pinvoke
shutdown
ticker
communication-protocol
festival
svn-merge
objloader
gradle-script-kotlin
hspec
wcf-ria-services
cron-task
boost-hana
usb-drive
asp.net-mvc-2
multinomial
affix
apigee-baas
xjc
sqoop2
livechat
dmp
phpdocx
kraken.js
lumx
initialization-vector
va-list
autostart
vim-powerline
symfony-2.0
cosm
getstring
adsl
search-path
.app
svn-hooks
task-management
iphone-sdk-3.2
plinq
gears

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