Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

/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.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top