def index(self):
scope = "alexa_all"
sd = json.dumps({
"alexa:all": {
"productID": ProductID,
"productInstanceAttributes": {
"deviceSerialNumber": "001"
}
}
})
url = "https://www.amazon.com/ap/oa"
callback = cherrypy.url() + "code"
payload = {"client_id": Client_ID, "scope": "alexa:all",
"scope_data": sd, "response_type": "code", "redirect_uri": callback}
req = requests.Request('GET', url, params=payload)
p = req.prepare()
raise cherrypy.HTTPRedirect(p.url)
auth_web.py 文件源码
python
阅读 37
收藏 0
点赞 0
评论 0
评论列表
文章目录