How to omit password protection with headless Shopify

ptrck_schndr
Tourist
7 0 2

So we Partners all know, that we have to live with a password page, when we want to develop a Shopify Store for a customer, like pronounced last year in August: https://changelog.shopify.com/posts/important-changes-to-new-development-stores

When it comes to use Shopify as a headless store, we can use the Storefront API to fetch data from pages, collections and products. Password pages don't have an effect to this API – so we can use this, even if we are still developing on a development store with a password protected storefront. So far so good.

But what can we do, if we need some metafields saved to e.g. a page and need to fetch this data? The only solution can be, that we program a customized template and print out a JSON out of this – so that in the end we can use something like https://foobar.myshopify.com/pages/somedata?view=json

But this page will always redirect to the password page if we fetch the data with an ajax call. I already found out, that we can use the `_bt` key from a preview url to omit the password page, but this is a short-lived token and we always have to change this token every hour (or so). Is there no other way to omit the password page for headless Shopify integrations?