I am working on creating an app with this repo: https://github.com/Shopify/shopify-node-app/. Everything is working great in retrieving product data and some data about assets but I am having trouble with retrieving the contents of asset files.
For example, this call works perfectly in retrieving a complete list of theme assets as an object:
What’s weird is this call just retrieves the same data as the first call which is just a big list of the assets in the theme as an object… but no specific asset contents.
calls like this /products/1977430802490.json inside the demo api console return a product object just fine.
Now I know we are using shopify-api-node for some things, but it doesn’t seem to be involved after app init. That’s why I was trying out these calls straight from the docs.
Looks like the query string is just not being proxied by ngrok. Try a call to products.json with some query params like fields=xxxxx and validate whether you’ll get the payloads limited just to the fields you have listed. If not, then most probably there is a misconfiguration on the ngrok side?
Not sure if this could be related but looks like it is a access scope problem, as you mentioned you can query your products but not the themes, check this link about setting up those scopes on your app:
By default the Shopify CLI sets the app only with products permissions, you must add the theme and all other API you want to read/write on your ENV File.