V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
vimmer
V2EX  ›  程序员

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

  •  
  •   vimmer · 2016-07-10 17:00:23 +08:00 · 6204 次点击
    这是一个创建于 2850 天前的主题,其中的信息可能已经有所发展或是发生改变。

    举例, 获取电台歌曲: 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"}}
    
    1 条回复    2016-07-11 14:35:51 +08:00
    kirsysuv
        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 不在白名单中
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   941 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 20:18 · PVG 04:18 · LAX 13:18 · JFK 16:18
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.