-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[shopify-app-remix] Authenicating public request 401 #409
Comments
Hey, random question, but do your other Authenticate methods pass successfully? I currently get 401 on everything but it's a new project |
@TheRealFlyingCoder you have to using like this Shopify/shopify-api-js#936 (comment) |
Hi! In reality Since the storefront API is public, you should be ok making requests to it as long as you have the access token. Right now, we don't provide a way to do that out of this package, but we'll be introducing it in the near future. I believe it will look something like this (definitely not final!): const {storefront} = shopify.unauthenticated.storefront(shop, {publicAccessToken: <optional-public-token>}); In the meantime, I know it's not ideal, but you can use that comment you linked to and create a |
I actually struggled to figure this one out yesterday, I gave up and installed a separate API package to pass the access token to so I could make requests separately to the Shopify app. I'll check again today, but I feel like the reexported ShopifyApi was missing this functionality? 👀 |
Hey folks! We've released a new version of the package that provides the unauthenticated Storefront context. Here is how you can use it in the latest versions: https://shopify.dev/docs/api/shopify-app-remix/v1/unauthenticated/unauthenticated-storefront Since I believe this addresses the original issue, I'm going to close this. Feel free to open a new one if you still have problems. |
Overview/summary
I'm following this guide to get shopify storefront data https://github.com/Shopify/shopify-app-js/tree/main/packages/shopify-app-remix#authenticating-public-requests, but my request is 401 now, I guess we need an authorization at header for request, what should I do now?
The text was updated successfully, but these errors were encountered: