App reviews, troubleshooting, and recommendations
Hey,
I'm trying to redirect to my server with the code and the other query parameters to save them on behalf of the user, but I've never gotten a hit back during OAuth. I've dumbed it down as much as possible and still nothing.
Help would be appreciated - thanks.
Solved! Go to the solution
This is an accepted solution.
The same applies when your app is installed from the app store. You will need to redirect them to this url for installation: https://${shop}/admin/oauth/authorize?client_id=${client_id}&scope=${scopes}&redirect_uri=${redirectUri}&state=${nonce}, where redirectUri is your url, where your logic for requesting access token resides. Then, Shopify will include a temporary code as part of redirectUri during the OAuth process and redirect it, which you will use to request for access token.
These two docs elaborate this: Implement authorization code grant manually (shopify.dev) and https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant
If I understand your question correctly, your app needs to do the redirection during installation - it does not happen automatically.
Thanks for the reply. So that's what I thought at first, but when the app is public in the app store doesn't Shopify manage all of that on their end? They click to install the app, Shopify pops up that authorize link on their end and then when it's installed it calls my callback URL.
Your response works which makes sense, I just don't understand the flow then. I figured when a user clicks on our app in the app store Shopify automatically handles the authorize link part because if it's on me to do it where am I supposed to redirect? Hope that makes sense.
This is an accepted solution.
The same applies when your app is installed from the app store. You will need to redirect them to this url for installation: https://${shop}/admin/oauth/authorize?client_id=${client_id}&scope=${scopes}&redirect_uri=${redirectUri}&state=${nonce}, where redirectUri is your url, where your logic for requesting access token resides. Then, Shopify will include a temporary code as part of redirectUri during the OAuth process and redirect it, which you will use to request for access token.
These two docs elaborate this: Implement authorization code grant manually (shopify.dev) and https://shopify.dev/docs/apps/auth/get-access-tokens/authorization-code-grant
I'd seen the second link but not the first one that explains what you just described to me. Thank you for your time - I appreciate it!
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024