商品详情接口中,返回的图片地址403无权访问
907 浏览2023年04月28日作者:Bckj

代运营服务商角色,通过接口控制商品查询及上下架及相关操作。

其中通过“查询商品线上数据”(文档:https://developer.open-douyin.com/docs/resource/zh-CN/dop/develop/openapi/life-service-open-ability/life.capacity/goods/online.get)返回的商品信息,所有包含图片的地址,无法直接访问的,访问都提示403或需要授权等相关提示字眼。


在自己开发的系统里,即便拿到了图片地址也没法展示,很令人费解。麻烦问一下,这块设计是否存在bug。


场景复现:

比如下面接口地址的返回的图片地址:

https://p3-sign.douyinpic.com/obj/tos-cn-i-hf2m9xxmck/6ad0313fd3914c86869c554a728d8443?x-expires=1682694000\&x-signature=6GvLoQLxPHzVXqiPh169Ll9hs60%3D\&from=709197913


访问改地址 页面显示403


接口返回地址内容详情:

{
    "BaseResp": {
        "StatusCode": 0,
        "StatusMessage": ""
    },
    "data": {
        "error_code": 0,
        "has_more": false,
        "next_cursor": "2",
        "products": [
            {
                "commission_info": {
                    "platform_take_rate": 0
                },
                "online_status": 1,
                "product": {
                    "telephone": [
                        "1234-4321"
                    ],
                    "update_time": 1682584537,
                    "out_id": "liangpi-001",
                    "pois": [
                        {
                            "poi_id": "7149701083512703016",
                            "supplier_ext_id": "life_7149701083512703016",
                            "supplier_id": 7161715034932905992
                        }
                    ],
                    "product_id": "7225499167056775224",
                    "product_type": 1,
                    "creator_account_id": 7202809349490608161,
                    "sold_start_time": 1681962313,
                    "account_name": "兰山区秦小白面食馆",
                    "attr_key_value_map": {
                        "rec_person_num": "1",
                        "DateRule": "{\"unavailable_date\":{\"date_list\":[],\"weekday_list\":[],\"not_available_on_holidays\":false}}",
                        "Images": "[\"https://sf1-dycdn-tos.pstatp.com/obj/tos-cn-i-hf2m9xxmck/79f26393967e4fdfbfc4894d7e1bcc54\",\"https://sf1-dycdn-tos.pstatp.com/obj/tos-cn-i-hf2m9xxmck/aea43b1ec8de419da405761d896d03dd\"]",
                        "appointment": "{\"need_appointment\":false}",
                        "image_list":"[{\"url\":\"https://p3-sign.douyinpic.com/obj/tos-cn-i-hf2m9xxmck/79f26393967e4fdfbfc4894d7e1bcc54?x-expires=1682694000\&x-signature=kCwbSpNADeZsagvbmo%2FIgphODfg%3D\&from=709197913\"},{\"url\":\"https://p3-sign.douyinpic.com/obj/tos-cn-i-hf2m9xxmck/aea43b1ec8de419da405761d896d03dd?x-expires=1682694000\&x-signature=m6lxTjaS8xLkx6lpN%2FLvmqgNIY8%3D\&from=709197913\"}]",
                        "platform_unified_description": "{\"note_type\":1,\"content\":\"如部分菜品因时令或其他不可抗因素导致无法提供,商家会用等价菜品替换,具体事宜请与商家协商。\"}",
                        "superimposed_discounts": "true",
                        "use_date": "{\"use_date_type\":2,\"day_duration\":99}",
                        "Notification": "[{\"title\":\"凉皮\",\"content\":\"好吃不贵,欢迎品鉴\"}]",
                        "SupplierExtIdList": "[\"life_7149701083512703016\"]",
                        "rec_person_num_max": "2",
                        "use_time": "{\"use_time_type\":1}",
                        "PostPurchaseDay": "99",
                        "RefundPolicy": "1",
                        "SubTitle": "过期退",
                        "can_no_use_date": "{\"enable\":false}",
                        "show_channel": "1"
                    },
                    "biz_line": 1,
                    "category_id": 1017002,
                    "category_full_name": "美食·快餐小吃·小吃",
                    "create_time": 1682317650,
                    "owner_account_id": 7153906522395772942,
                    "product_name": "凉皮",
                    "sold_end_time": 1684554313
                },
                "sku": {
                    "create_time": 1682320397,
                    "origin_amount": 1998,
                    "status": 1,
                    "actual_amount": 996,
                    "attr_key_value_map": {
                        "market_price": "900",
                        "settle_type": "2",
                        "code_source_type": "1",
                        "commodity": "[{\"group_name\":\"小吃\",\"total_count\":1,\"option_count\":1,\"item_list\":[{\"name\":\"凉皮\",\"price\":1998,\"count\":1,\"unit\":\"份\",\"item_id\":\"7225112043782162487\"}]}]",
                        "limit_rule": "{\"is_limit\":true,\"total_buy_num\":9}"
                    },
                    "sku_id": "7225499167056775224",
                    "sku_name": "凉皮",
                    "stock": {
                        "limit_type": 1,
                        "stock_qty": 500
                    },
                    "update_time": 1682320397
                },
                "skus": null
            },
            {
                "product": {
                    "category_full_name": "美食·快餐小吃·面",
                    "attr_key_value_map": {
                        "can_no_use_date": "{\"enable\":false}",
                        "comsumption_threshold": "{\"enable\":false,\"description\":\"\"}",
                        "description_rich_text": "[{\"note_type\":1,\"content\":\"\"}]",
                        "dishes_image_list": "[{\"name\":\"臊子面\",\"uri\":\"tos-cn-i-hf2m9xxmck/8e699eb5a4dc42d193772f944e70b51d\"}]",
                        "image_list":"[{\"url\":\"https://p3-sign.douyinpic.com/obj/tos-cn-i-hf2m9xxmck/6ad0313fd3914c86869c554a728d8443?x-expires=1682694000\&x-signature=6GvLoQLxPHzVXqiPh169Ll9hs60%3D\&from=709197913\"},{\"url\":\"https://p26-sign.douyinpic.com/obj/tos-cn-i-hf2m9xxmck/813d8a1f5eed4351b07cb0918c64dd67?x-expires=1682694000\&x-signature=87RunfBqfBbjvqFMnKw%2FvZnz7rI%3D\&from=709197913\"}]",
                        "platform_unified_description": "{\"note_type\":1,\"content\":\"如部分菜品因时令或其他不可抗因素导致无法提供,商家会用等价菜品替换,具体事宜请与商家协商。\"}",
                        "Images": "[\"https://sf1-dycdn-tos.pstatp.com/obj/tos-cn-i-hf2m9xxmck/6ad0313fd3914c86869c554a728d8443\",\"https://sf1-dycdn-tos.pstatp.com/obj/tos-cn-i-hf2m9xxmck/813d8a1f5eed4351b07cb0918c64dd67\"]",
                        "can_delivery": "false",
                        "consumption_convention": "{\"consumption_methods\":[1]}",
                        "private_room": "false",
                        "rec_person_num": "1",
                        "DateRule": "{\"unavailable_date\":{\"date_list\":[],\"weekday_list\":[],\"not_available_on_holidays\":false}}",
                        "auto_renew": "true",
                        "customer_reserved_info": "{\"allow\":false}",
                        "environment_image_list":"[{\"url\":\"https://p3-sign.douyinpic.com/obj/douyin-user-image-file/0becc9e8e1a8826425830318e9f067e4?x-expires=1682694000\&x-signature=P1P%2BCKzztR9Zn0BCVJxUJn3rwlE%3D\&from=709197913\"}]",
                        "free_pack": "false",
                        "real_name_info": "{\"enable\":false,\"scene\":0}",
                        "rec_person_num_max": "1",
                        "show_channel": "1",
                        "PostPurchaseDay": "360",
                        "use_date": "{\"use_date_type\":2,\"day_duration\":360}",
                        "superimposed_discounts": "false",
                        "use_time": "{\"use_time_type\":1}",
                        "appointment": "{\"need_appointment\":false}"
                    },
                    "creator_account_id": 7202809349490608161,
                    "pois": [
                        {
                            "poi_id": "7149701083512703016",
                            "supplier_ext_id": "7149701083512703016"
                        }
                    ],
                    "product_type": 1,
                    "sold_end_time": 1682404033,
                    "biz_line": 1,
                    "account_name": "兰山区秦小白面食馆",
                    "category_id": 1017006,
                    "create_time": 1682402822,
                    "owner_account_id": 7153906522395772942,
                    "product_id": "1764127196831791",
                    "product_name": "臊子面",
                    "sold_start_time": 1682402777,
                    "update_time": 1682403993
                },
                "sku": {
                    "status": 1,
                    "update_time": 1682402926,
                    "actual_amount": 299,
                    "attr_key_value_map": {
                        "settle_type": "1",
                        "code_source_type": "1",
                        "commodity": "[{\"group_name\":\"小吃\",\"total_count\":1,\"option_count\":1,\"item_list\":[{\"name\":\"臊子面\",\"price\":900,\"count\":1,\"unit\":\"份\",\"item_id\":\"7208093725904881679\",\"template_snapshot_id\":7195083942671190071}]}]",
                        "is_origin_amount_edited": "false",
                        "limit_buy_rule": "{\"enable_limit\":true,\"rule_list\":[{\"subject_type\":1,\"range_type\":3,\"limit_num\":1,\"unit\":\"份\"}]}",
                        "limit_rule": "{\"is_limit\":true,\"total_buy_num\":1}",
                        "refund_description": "[{\"note_type\":1,\"content\":\"到店核销:随时可退,过期未核销自动退\"}]"
                    },
                    "create_time": 1682402926,
                    "sku_name": "臊子面",
                    "origin_amount": 900,
                    "sku_id": "1764127196831791",
                    "stock": {
                        "limit_type": 2,
                        "stock_qty": 10000000000
                    }
                },
                "skus": null,
                "commission_info": {
                    "platform_take_rate": 0
                },
                "online_status": 2
            }
        ],
        "description": ""
    },
    "extra": {
        "error_code": 0,
        "description": "",
        "sub_error_code": 0,
        "sub_description": "",
        "logid": "2023042817040600B3FFF4ACAC4B6AA7AD",
        "now": 1682672646
    }
}
最后一次编辑于 2023 年 04 月 28 日
9 条评论

相关问答

专题推荐

热门文章

热门问答