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

New Member
7 0 0

Screen Shot 2020-01-13 at 8.21.42 pm.pngScreen Shot 2020-01-13 at 8.23.10 pm.pngScreen Shot 2020-01-13 at 8.24.28 pm.pngScreen Shot 2020-01-13 at 8.25.43 pm.pngScreen Shot 2020-01-13 at 8.26.25 pm.pngScreen Shot 2020-01-13 at 8.27.36 pm.png

Screen Shot 2020-01-13 at 8.33.36 pm.png

Screen Shot 2020-01-13 at 8.41.15 pm.png

Hi There,
I have been through many related posts regarding this but found no luck.  Im following this tutorial:

https://developers.shopify.com/tutorials/build-a-shopify-app-with-node-and-react/embed-your-app-in-s...

 

It seems like my API key is not being found at all as I assume it would be displayed in the browser error message and my API key under client_id in my shop address:

https://nnnneon.myshopify.com/admin/oauth/authorize?state=157891194866400&scope=read_products&client...

 

Any help would be appreciated!

0 Likes
Shopify Staff
Shopify Staff
13 1 5

Hi! Can you try generating another app configuration and trying with that? That is a strange error to run into when you first create an app and I will look into it.

0 Likes
New Member
7 0 0

Hi Tim,

I have created another app as well as another store, followed the tutorial again (everything works through the process) and Im still having the same issue.

Im hoping to get things sorted ASAP as I'm operating under AGILE framework.

Regards,
Louis

0 Likes
New Member
7 0 0

Hi Tim,

I have created another app as well as another store, followed the tutorial again (everything works through the process) and Im still having the same issue.

Im hoping to get things sorted ASAP as I'm operating under AGILE framework.

Regards,
Louis

0 Likes
Shopify Staff
Shopify Staff
13 1 5

Hi!, Is it possible that you have multiple partners accounts? Can you see the app in your partners dashboard? Does your local API key match the api key in your partners dashboard?

0 Likes
New Member
7 0 0

Hi Tim,

Ive checked and it doesn't look like I have multiple partner accounts, just multiple stores under the one partner account.  Each time I get to the stage of embedding the app into my storefront the redirection takes me to the error 400 in browser and causes the store I created to lock into a non-transferrable mode (meaning i need to make another store to try embedding) . I have too many stores I cant remove which will be my next query. 

0 Likes
Shopify Staff
Shopify Staff
13 1 5

We have checked the logs of your requests, and we have noticed that your client_id is blank meaning that you have not provided the API key in your configuration. Please make sure your API key is defined at runtime and not nil before making an authentication request

0 Likes
Shopify Staff
Shopify Staff
13 1 5

Actually I should have seen it in what you posted because the last link you posted is missing its client_id which is your API key

0 Likes
New Member
7 0 0

I do think its to do with client_id but that is not mentioned once in the tutorial.  Where do I look to check over this?m How do i go about making sure my API key is defined at runtime and not nil before making auth requests?

0 Likes
Shopify Staff
Shopify Staff
13 1 5

Just import SHOPIFY_API_KEY from your process.env like you have in your code snippet and print it to the console on any other action in your app. You just need to know that you can get that value while your app is running 

0 Likes