请问虾米音乐的 API 该如何使用?

2016-07-10 17:00:23 +08:00
 vimmer

举例, 获取电台歌曲: https://open.taobao.com/doc2/apiDetail.htm?spm=a219a.7395905.0.0.NUeDEa&scopeId=11421&apiId=23216

当我执行

curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=alibaba.xiami.api.radio.songs.get' \
-d 'partner_id=apidoc' \
-d 'sign=57FF5C2761755034816FF420831F3803' \
-d 'sign_method=hmac' \
-d 'timestamp=2016-07-10+16%3A59%3A21' \
-d 'v=2.0' \
-d 'limit=20' \
-d 'oid=0' \
-d 'type=6'

但是返回却是

{"error_response":{"code":11,"msg":"Insufficient isv permissions","sub_code":"isv.permission-ip-whitelist-limit","sub_msg":"The appkey 12129701 is only allowed to call from its ip white list, but the source ip 180.113.17.106 is not included","request_id":"z2cctmdvq4ud"}}
6215 次点击
所在节点    程序员
1 条回复
kirsysuv
2016-07-11 14:35:51 +08:00
权限问题
"The appkey 12129701 is only allowed to call from its ip white list, but the source ip 180.113.17.106 is not included"
这句里面解释了, ip 不在白名单中

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/291518

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX