0
votes

Is it possible to externally (from my non-embedded Shopify app) perform an API call that will emulate the functionality of the asset_url liquid tag and compile / process a .scss.liquid file into .css so that I can use it in an external app?

My app lives at subdomain.myapp.com and I want to be able to include the stores css files so that I can apply typography settings etc. from the store.

Presently I am getting the theme asset like so:

current_theme = shopify.Theme.find_first(role="main")
theme_css = shopify.Asset.find(key='assets/theme.scss.liquid', 
    theme_id=current_theme.id)

I know I could use an app proxy to embedd this page into Shopify, but I want to access the css outside of shopify.

1
Do you want to use the same styles in your App that Shopify has? - Subhrajyoti Das
Yes, but without the layout like header and footer. - coler-j
Use Shopify Polaris to develop your App (polaris.shopify.com) - Subhrajyoti Das
@SubhrajyotiDas that isn't an option as this app is not restricted to only Shopify. - coler-j

1 Answers

1
votes

You seem to have answered your own question with your question. Since you can make API calls to get theme assets like stylesheets, you are then free to use them as you wish. There is no difference in authentication and authorization with embedded vs. non-embedded Apps.