Fetch blog posts from NextJS with Storefront API

MichaelAbachyan
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.

 

0 Likes
mkamalkayani
Explorer
65 5 5

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

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

0 Likes