Even though the redirect URLs are correctly configured, I am getting “Oauth error invalid_request: The redirect_uri is not whitelisted” error. The redirect URL is accessible from my backend.
same! did you find a fix?
Hi folks
@Ahsan_Sadman_Khan, are the redirect URLs you set up also configured in your Partner Dashboard like this (with the correct URLs for your app)?
If so, could you let me know if you’re following an external link for the install process? We do only allow app installations through the app store or through a private link:
Hope this helps, if you’re still seeing the issue pop up, no worries just let me know and I’d be happy to help out further!
Hey @Ahsan_Sadman_Khan , wanted to follow up to see if the above helped/if we can mark this thread as solved? Let me know if I can help out further, just ping me here ![]()
This is happening when I am trying to use Ngrok. I have tested the endpoint, and it is pointing to the correct URLs.

Thanks @Ahsan_Sadman_Khan. I did a bit of digging into this, and I found a similar issue here on Stack Overflow:
Can you double check to see if the correct API key is being used? If so, no worries, happy to keep troubleshooting with you. Another thing to check is to see if the same issue occurs when you’re using one of our app templates through the CLI:
If you run shopify app dev after setting up a boilerplate app, it should actually run a Cloudflare redirect instance. We did at one point offer ngrok redirects, but in our app templates through the CLI, Cloudflare is the supported dev tunnel tool. If you’re not using one of our app templates, that’s alright too, if you’re open to sharing your app name/app ID, I’m happy to take a look into this further (let me know if you’d prefer to DM me that info in this thread and I can set the DM up as well).
I’v got the same question
- i’v set the correct redirect url as
http://localhost:5002/auth/shopify/callbackat app dashboard
- run app local:
shopify app dev --config=development --use-localhost --localhost-port 3000
shopify.app.development.toml redirect_urls:
- run local service at localhost:5002(business service)
- press ‘p’ to preview the app at step 2
- browser access https://quickstart-137d8ffe.myshopify.com/admin/oauth/authorize?redirect_uri=http://localhost:5002/auth/shopify/callback (removed the other param)
- it redirect to ‘https://admin.shopify.com/store/quickstart-137d8ffe/oauth/authorize?redirect_uri=http://localhost:5002/auth/shopify/callback’ (removed the other param)
- Then it shows ‘Oauth error invalid_request: The redirect_uri is not whitelisted’
What is the problem?
Tips: Maybe when error happens, shopify developer staff can print the request id at the page, we can provide the request id for further question navigate….
Hey @leo_zhang, I think I see what’s happening here. The issue is likely that you’re using --use-localhost which serves your app locally, but Shopify’s OAuth flow needs a publicly accessible URL to redirect back to after authorization.
Localhost URLs can’t be validated by Shopify’s servers since they’re not reachable from the internet. Instead, could you try running just shopify app dev without the --use-localhost flag, which will automatically create a Cloudflare tunnel and update your redirect URLs in the Partner Dashboard. You can read more about the dev workflow here: https://shopify.dev/docs/api/shopify-cli/app/app-dev. Let me know if that clears things up or if you’re still seeing issues!
@Alan_G Hi,I’ve did what you said, it still got the error
- use
shopify app dev --config=developmentmy shopify.app.development.toml is blow - use
ngrok http 5002to reverse proxy local server at localhost:5002 - press ‘p’ to review at step 1, then got this error https://admin.shopify.com/store/quickstart-137d8ffe/oauth/authorize?redirect_uri=https://ade8e36d25ea.ngrok-free.app/auth/shopify/callback
Hey @leo_zhang
, that is definitely odd. It looks like you’re using Ngrok there, can you try running something like this (replacing your own ngrok URL?
shopify app dev --tunnel-url=https://<ngrok-URL>:3000
This should let your dev instance use the Ngrok tunnel as the app server (I’d keep your redirect URL the same though!). There’s some more info in our docs here.
Hope this helps, let me know if you run into any other issues.
emmm, yeah that will work, here is my arch
now i want to dev a theme extension at shopify app(None-embedded) ,what should i do to solve this problem (can’t preview my extension at theme editor) ?
I follow the instruction “Configure theme app extension” , it says:
By default, themes don’t include app blocks after an app is installed. Merchants need to add the app blocks to the theme from the Apps section of the theme editor.
Thanks for following up @leo_zhang. It looks like your app installed correctly there, but the theme extension itself isn’t popping up? Did you create it as an app block or as an app embed?
App blocks would appear in the theme section editor itself like this:
This is how our example extension is set up:
Hope this helps - let me know if I can assist further ![]()
- i create the extension as ‘theme extension‘
my app ‘‘efficiency-assistant‘ is not embedded
- my online app is ‘efficiency-assistant‘ not ‘test1’,
test 1 is just a test app to debug generated by ‘shopify app init‘, and it’s shopify.app.toml is
The core question is:
does a none-embedded app can preview/dev a theme extension in it ?
Hey @leo_zhang ![]()
Just to confirm what you’re seeing - your non-embedded app “efficiency-assistant” isn’t showing the theme extension in the theme editor?
To clarify, non-embedded apps should work in the preview mode and the embedded vs non-embedded status shouldn’t prevent your theme extension from appearing in the theme editor. Both types of apps fully support theme app extensions.
Our of curiosity, have you run shopify app deploy for your efficiency-assistant app since you added the theme extension? Sometimes running app deploy can help the extensions appear in the menu if you haven’t run that yet. Also, can you confirm that efficiency-assistant is installed on the dev store where you’re trying to view it in the theme editor?
Also, when you run shopify app dev --tunnel-url with your ngrok setup, does the CLI output mention anything about your theme extension loading? That might give us a clue about whether the extension is being recognized. You can add --verbose to the end of your shopify app commands and if you’re open to sharing the verbose logs in plaintext we can take a look to see if things are deploying correctly.
Let me know what you find and we can dig deeper from there, happy to help!
- ‘shopify app deploy‘ didn’t show any extension info, yeap,find the question, why it didn’t deploy new extensions ?
shopify app dev --tunnel-url
didn’t show any extension info, and why is that,i’m confused.
Hey @leo_zhang
- I think I might see what’s happening here. Here’s what your extensions folder should look like:
I can’t say for sure, but it looks like your extensions folder might be named extensions/car-variants? If you change the parent folder name to extensions and the sub folder where all of your other folder live “car-variants” that may solve the missing extensions issue there.
Hope this helps!
e..,the extension folder is generate by ‘shopify app generate extension‘, the display is just a feature how vscode shows it
Thanks for confirming @leo_zhang , in my version of VS code, the menu looks different, so I appreciate you trying that. One other thing to check if you’re still seeing the issue, can you double check that your shopify.extension.toml is configured properly:
If that’s all good, can you run the shopify app deploy command, but add the directive:
--verbose
At the end of the CLI command and share the full output of the deploy attempt with me? I can take a look to see if we can look into our logs on our end here to investigate further since it is odd that it’s failing to deploy the extension.
Thanks for sharing that @Leo, I’m seeing this message in the logs there:
2025-11-05T01:45:05.073Z: The following extension specifications were defined locally but not found in the remote specifications: tax_calculation
2025-11-05T01:45:05.073Z: The following extension specifications were found in the remote specifications but not defined locally: admin_app, app_link, app_nav_item, bulk_action, checkout_script_tag, flow_action_definition, flow_trigger_definition, flow_trigger_discovery_webhook, manage_marketplaces, marketing_action, marketing_activity_extension, merchandising_create_publication, merchandising_fulfillment_variant_details, ping_message_callback, pos_link, product_configuration_link, resource_publication_settings, retail_cart_promotion, retail_product_recommendation, subscription_link
2025-11-05T01:45:05.074Z: Reading the content of file at shopify.app.toml...
2025-11-05T01:45:05.075Z: Reading the content of file at .gitignore...
2025-11-05T01:45:05.287Z: Reading the content of file at package.json...
2025-11-05T01:45:05.287Z: Reading the content of file at package.json...
2025-11-05T01:45:05.289Z: Running system process:
· Command: npm prefix
· Working directory: /Users/seazhang/Public/projects/tp-efficiency-assistant/external/shopify_app/efficiency-assistant
The extension may not be being pushed since it’s specified as a “tax_calculation” which isn’t a valid extension type (more info here). In your extension.toml file you’ll want to make sure that the type is set like this:
[[extensions]]
name = "checkout-ui"
handle = "checkout-ui"
type = "ui_extension"
uid = "fddfc370-27c7-c30f-4ee0-a927194e2accadefd40c"
It looks like your extension variables in the TOML for car-variants has two “type” fields, if you can try removing one of those fields and just leave one like the example below that might help as well:
type = "theme"
Let me know if you’re still seeing issues with the above fixes. If not, I’m happy to keep helping out over DM here ![]()




















