Invalid API Key when creating a new Shopify app using Shopify-CLI.

tech_sh
Visitor
2 0 0

I had created a custom app using shopify CLI that I installed on a development store I had made through shopify partners. I encountered some issues when uploading to Github so I decided to delete the app and create a new one to avoid problems down the line. I deleted the app, but now, when I try to create a new one and install it on my development store, I keep getting the error:

"Oauth error invalid_request: Could not find Shopify API application with api_key 9daabef097f6733a53567a11ff75e1c8"

I have tried to delete these apps and create new ones, and every time I get the same error with the same api_key displayed in the error message above. I have also tried to uninstall and reinstall the shopify-cli package, and nothing has worked. The api_key that is being shown in the error does not match the API key that is stored in the .env file of the created app, so I am not sure why this API key keeps getting put in the installation url.  I have tried to just replace the API key in the url before loading it, but that doesn't work either. I usually get a "request cannot be verified" message when I try to do that.

What could be causing this problem and how can I fix it?

Replies 2 (2)

tech_sh
Visitor
2 0 0

I have also tried creating a new shopify partner account and the problem still persists.

Galmis
Shopify Partner
35 0 11

I was facing the same issue and tried renaming, deleting and recreating apps without any success. 

I also tried renaming the server name in heroku and updating the app URL, which didn't help either. Creating a new server instance with exactly the same name as before fixed the problem. I'm guessing Shopify might be associating apps with their host IPs.