I use V1/getproductimage/<sku> and get product's image url from API. It returns

[
    {
        "product_image_url": "http://<host>/pub/media/catalog/product/cache/36e9cda53c678653975daba9a022fb1d/<media file>"
    }
]

I'm developing LINE chatbot, It need HTTPS URL to be action in LINE FLEX. So, I want to know how can I get product image from REST API as HTTPS. Thank you in advance.

有帮助吗?

解决方案

There isn't anything specific to API that you need to do. Just make sure that the "Secure Base URL for Static View Files" under Stores > Settings > Configuration > Web is properly configured to use https.

其他提示

/V1/products?searchCriteria[pageSize]=20

Modify the API url like above code fragment. You will get all details about the products where you can also find image path too.

许可以下: CC-BY-SA归因
scroll top