Focuses on API authentication, access scopes, and permission management.
I'm trying to build a shopify authorize URL for oauth, in this format:
I have gone through all the query parameters and set them correctly, redirect_url exactly matches the URL in Allowed redirection URL(s) under 'App setup' tab. I've gone through all the app settings like enabled storefront API. But when test the URL and redirection, I get this error, Unauthorized Access:
I'm not sure what I'm doing wrong. There's no other settings in app settings that seem to be relevant. Was anyone else able to resolve this?
Are you an admin on the store you are trying to connect to? I think only Admins can add apps.
You could setup a demo store from your partners portal and try that first?
No, not admin. But isn't there a way to authenticate to other people's shopify account using oauth and do things like read products and post to blog?
You need to make sure your user has permissions to install Apps. I guess it does not, so speak to the store owner to grant you permission. Or give them the install link and have them install it for you.
can you tell me how to handle that unauthorized access because it is not hitting the callback route or it does not return anything rather than a auth url here is my code
const authUrl = shopifyToken.generateAuthUrl(shop);
res.redirect(authUrl);
Did you choose a distribution method for the app you registered
You need to log into the store you are trying to install the app on first. My issue was I logged into the Partners Dashboard and updated the app settings. I thought that's all that was need, but you need to login directly to the Shopify Store you want to install the app on first.