Unable to connect shopify store to react app using shopify-buy

Hey All,

I am trying to create a react app to integrate Shopify into it. Have gone through the documentations provided by the Team. As per the documentation, i have already created an online store. In there, i have added the products that i intend to show in the app. And the details of the products too (Including price, size, description etc).

How can i use Shopify’s Javascript-Buy-SDK for fetching the list of products, the product details, add to cart etc?

import Client from 'shopify-buy'; 

const client = Client.buildClient({ 
     domain: 'your-shop-name.myshopify.com', 
     storefrontAccessToken: 'your-storefront-access-token' 
});

I used the above code to connect to the app as per documentation but when I try to fetch products I’m getting 403 error.

client.product.fetchAll().then((products) => { 
    // Do something with the products console.log(products); 
}); 

any leads on what could be wrong here?