有赞新零售社区

发帖
API使用问题»麻烦看一下哪里写错了?

[API调用-商品/交易] 麻烦看一下哪里写错了?

羌荣 01-03 613 浏览 5 评论 | 只看楼主 [打印]
https://open.youzanyun.com/api/y ... b342437677c29b5cea0


{"gw_err_resp":{"trace_id":"yz7-0ae85be1-1704159961635-915256","err_msg":"非法请求地址","err_code":4001}}


{"m_token":"664ad0f18e79b342437677c29b5cea0","goods_no":"011000580","on_shelve":1,"price":0,"cost_price":0,"postage":0,"name":"Sartria2P西服","category":0,"title":"Sartria2P西服","tag_ids":[106885611],"item_img_urls":["https://image-c.weimobwmc.com/openruntime/514279f3784144f3b40ae9704ef29a74.jpg"],"category_id":"106705630","quantity_unit_id":1,"rights_type":1,"node_kdt_id":135223220,"access_token":"664ad0f18e79b342437677c29b5cea0"}
用手机打开
收藏 ··· 回复
    您好,access_token作为入参传入了,access_token需要拼接在API后面,不能作为入参传入{
    "body": "{\"m_token\":\"664ad0f18e79b342437677c29b5cea0\",\"goods_no\":\"011000580\",\"on_shelve\":1,\"price\":0,\"cost_price\":0,\"postage\":0,\"name\":\"Sartria2P西服\",\"category\":0,\"title\":\"Sartria2P西服\",\"tag_ids\":[106885611],\"item_img_urls\":[\"https://image-c.weimobwmc.com/openruntime/514279f3784144f3b40ae9704ef29a74.jpg\"],\"category_id\":\"106705630\",\"quantity_unit_id\":1,\"rights_type\":1,\"node_kdt_id\":135223220,\"access_token\":\"664ad0f18e79b342437677c29b5cea0\"}"

      羌荣 青铜   01-04 | 只看该作者
      https://open.youzanyun.com/api/youzan.mei.product.create.4.0.0

      {"m_token":"664ad0f18e79b342437677c29b5cea0","goods_no":"011000580","on_shelve":1,"price":0,"cost_price":0,"postage":0,"name":"Sartria2P西服","category":0,"title":"Sartria2P西服","tag_ids":[106885611],"item_img_urls":["https://image-c.weimobwmc.com/openruntime/514279f3784144f3b40ae9704ef29a74.jpg"],"category_id":"106705630","quantity_unit_id":1,"rights_type":1,"node_kdt_id":135223220,"access_token":"664ad0f18e79b342437677c29b5cea0"}

      {"gw_err_resp":{"trace_id":"yz7-0a350a45-1704335402411-976814","err_msg":"非法请求地址","err_code":4001}}

      这样对么,还是报错
      • 千寻 01-04
        您好,还是之前的问题导致的"body": "{\"m_token\":\"664ad0f18e79b342437677c29b5cea0\",\"goods_no\":\"011000580\",\"on_shelve\":1,\"price\":0,\"cost_price\":0,\"postage\":0,\"name\":\"Sartria2P西服\",\"category\":0,\"title\":\"Sartria2P西服\",\"tag_ids\":[106885611],\"item_img_urls\":[\"https://image-c.weimobwmc.com/openruntime/514279f3784144f3b40ae9704ef29a74.jpg\"],\"category_id\":\"106705630\",\"quantity_unit_id\":1,\"rights_type\":1,\"node_kdt_id\":135223220,\"access_token\":\"664ad0f18e79b342437677c29b5cea0\"}",

        调用接口报错,非法请求凭证排查指南:https://doc.youzanyun.com/resource/doc/4036/4036
      • 羌荣 回复 千寻 01-05
        放后面:
        https://open.youzanyun.com/api/youzan.mei.product.create.4.0.0

        {"m_token":"664ad0f18e79b342437677c29b5cea0","goods_no":"011000580","on_shelve":1,"price":0,"cost_price":0,"postage":0,"name":"Sartria2P西服","category":0,"title":"Sartria2P西服","tag_ids":[106885611],"item_img_urls":["https://image-c.weimobwmc.com/openruntime/514279f3784144f3b40ae9704ef29a74.jpg"],"category_id":"106705630","quantity_unit_id":1,"rights_type":1,"node_kdt_id":135223220,"access_token":"664ad0f18e79b342437677c29b5cea0"}

        {"gw_err_resp":{"trace_id":"yz7-0a350a45-1704335402411-976814","err_msg":"非法请求地址","err_code":4001}}

        放前面:
        https://open.youzanyun.com/api/youzan.mei.product.create.4.0.0?access_token=664ad0f18e79b342437677c29b5cea0

        {"goods_no":"011000580","on_shelve":1,"price":0,"cost_price":0,"postage":0,"name":"Sartria2P西服","category":0,"title":"Sartria2P西服","tag_ids":[106885611],"item_img_urls":["https://image-c.weimobwmc.com/openruntime/514279f3784144f3b40ae9704ef29a74.jpg"],"category_id":"106705630","quantity_unit_id":1,"rights_type":1,"node_kdt_id":135223220}

        {"gw_err_resp":{"trace_id":"yz7-0ae85be5-1704335622830-294503","err_msg":"非法请求地址","err_code":4001}}

        我这边试了将TOKEN放前面或者放后面都抛错,所以麻烦告诉我一下正确的写法


        1跳至
        您需要登录后才可以回帖 登录 | 立即注册

        本版积分规则

        复制链接
        新浪微博
        QQ空间
        微信扫码
        • 回复

        • 评分

        客服工作时间是9:00-18:00,客服妹子当前不在线,若不能及时回复请谅解。试试右上角的搜索吧,论坛有丰富的经验贴、公告贴,相信一定能够帮到您~

        复制成功