All things Shopify and commerce
I'm just starting with Shopify and I'm a little overwhelmed with all the information.
What I need is to fetch the data for a certain collection from the endpoint:
https://admin.shopify.com/store/{store-name}/collections/{collection-id}/products.json
Then I need to display a few of the products in a section on one of my store's pages. The problem I encounter is that this endpoint obviously needs some sort of authentication and I don't know how to authenticate my request.
So far, I've been reading the docs and I believe I need to make a theme app extension maybe, but I'm still not exactly sure how to fetch the data properly. Do I fetch it from the App itself and pass it to the extension somehow or am I completely missing the point?
Any help would be appreciated, thanks!
Hi @Shogun28 ,
This is Theodore from PageFly - Shopify Page Builder App.
- To fetch data from Shopify, you need to authenticate using your API key and password.
- Use a theme app extension to access data within the theme without exposing your API key.
- Fetch data in the app's controller using Shopify's built-in API client or a library like shopify_api.
- Pass data to the extension using Liquid variables or JSON.
- Consider security, caching, using libraries, and referring to Shopify documentation.
Best regards,
Theodore | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025