Fetch blog posts from NextJS with Storefront API

New Member
1 0 0

Hi I try to fetch blog all posts from my store in NextJS app. I use Shopify JavaskriptBySdk for get products, collections etc. and all is ok, but when I fetch blog posts with (https://{my.store.name}.myshopify.com/admin/api/2021-04/blogs.json) i get error in response (Status Code 401). I am new in Shopify please help with this problem (please as detailed as possible - I work with Shopify about 1 month). Thanks for help a lot.


Reply 1 (1)
Shopify Partner
84 8 12

Do you have the access scope `read_content` or `write_content`?

Details: https://shopify.dev/docs/admin-api/access-scopes