Redirect URL not whitelisted

I am trying to use shopify oauth and I am using an ngrok url, this is the full shopify url generated for the consent https://admin.shopify.com/store/mango-ai-store/oauth/authorize?client_id=27478697c3e9d56777cc6170565c8407&scope=write_inventory%2Cread_inventory%2Cwrite_metaobject_definitions%2Cwrite_metaobjects%2Cread_products%2Cwrite_products&redirect_uri=https%3A%2F%2F5774-102-89-23-161.ngrok-free.app%2Fapi%2Fstores%2Fcallback&state=eyJvcmdJZCI6IjY5YmMxMTgwYTdhNzk4N2IxZTgzMmZiYyIsIm4iOjE3NzQ0MjkwMDMxNjJ9

in my dev store under the app I added this as the redirect url array
[“https://5774-102-89-23-161.ngrok-free.app/api/stores/callback”] but I keep getting redirect url not whitelisted, I have tried everything I can, doesn’t seem to be a code issue but more of a configuration issue, please can anyone help out here and how to trouble shoot but I am sure I am doing everything right

Hey @Ayo :waving_hand: Your redirect URL configuration looks correct based on what you’ve shared, so something else is likely causing the mismatch.

One thing that catches developers out is that redirect URLs in the Dev Dashboard only take effect when they’re part of a released app version. If you edited the URLs after your last release, they won’t apply until you create and release a new version. You can verify what’s active on the Versions tab of your app in the Dev Dashboard.

If you’ve ever used the Shopify CLI to run shopify app dev on this store, that’s also worth checking. The CLI creates a dev preview that can override your released config with its own tunnel URLs, and it persists after the dev session ends. Running shopify app dev clean clears it and restores the released version. That was the fix in this thread and this one.

If neither applies, let me know whether you’re using the CLI at all and I can dig further.

@Donal-Shopify Thank you very much, I have previously ran the app on shopify cli with shopify run dev, I guess that was the issue, it’s worked now. Appreciate your help

1 Like