Need help getting Shopify logo URL

Solved
flareAI
Shopify Partner
438 38 137

Hello,

I am able to get the logo URL from Assets API. however it is in format" shopify://shop_images/test_shopify_logo.png"

How do I reference it to cdn to get the accessible image URL.

0 Likes
Zameer
Shopify Staff (Retired)
Shopify Staff (Retired)
295 32 77

This is an accepted solution.

Hey there,

 

What exactly is the API call that you're making?

 

Our Assets API returns the `public_url` for each asset associated with the theme.  You would just have to make a GET request as described in the docs:

 

GET /admin/api/2019-04/themes/#{theme_id}/assets.json

Let me know if that ends up providing you with the CDN URLs you're looking for!

0 Likes
Blkc
Tourist
9 1 4

Quick question regarding this topic,

 

There seems to be a method from this thread,

https://community.shopify.com/c/Shopify-APIs-SDKs/how-to-get-shop-logo-to-use-it-into-shopify-app/m-...

 

However I still can't get the public url.

 

/admin/api/2019-04/themes/#{theme_id}/assets.json

also does not seem to have the logo listed.

0 Likes
promoai
Shopify Partner
2 0 0
I think the actual answer is you can't. If you are trying to get the URL for an image that's part of the theme, then it will be available from the Assets API call. However, if you're wanting the logo_url (which is a file uploaded to the Shop) you can't exactly get this from the API. As far as I can tell, there is no way of getting uploaded files via a File API of sorts.
0 Likes
devdude
Excursionist
22 1 18

I have the exact same problem as the OP and see this is marked as the correct answer, but really you did not answer OP's question.

 

The first step works, retreiving the following URL

GET https://<STORE_NAME>.myshopify.com/admin/themes/<THEME_ID>/assets.json?asset[key]=config/settings_da...

produces a json output containing a reference to the image in question;

 "logo": "shopify:\/\/shop_images\/a403eac45598213843f12eb307dce365.jpg"

 But how can I then "use it to reference with the Shopify CDN."?

https://www.merchbot.net
0 Likes