Getting 404 error during oauth setup

Solved
Tourist
10 1 0

I'm on step 2 of the docs here:

https://help.shopify.com/en/api/getting-started/authentication/oauth#step-2-ask-for-permission

 

My app is redirecting to my test shopify app to ask for permissions to install. The url I'm using is:

https://{myTestStore}.myshopify.com/oauth/authorize?client_id={my api key}&scope=write_content,write_themes,write_products,write_customers,write_orders,write_shipping,write_checkouts,write_price_rules&redirect_uri=https%3A%2F%2Fwww.mydomain.com%2FAppDirectory-Dev%2F2FAppDirectory-dev.cgi%2FAPI%2Fauth%2Fshopify%2Fcallback&state=2RgNjJPKn8fDkWDdjM0GsWBXsNYn2Pm

 

No matter where I redirect to at mystore.myshopify.com/oauth/authorize? I will get a 404 error. What am I doing wrong here?

0 Likes
Tourist
10 1 0

Also yes my redirect url is in my whitelist in the app settings.

0 Likes
New Member
1 0 0

If you read careful the docs, the url should be:

 

https://{shop}.myshopify.com/admin/oauth/authorize?client_id={api_key}&scope={scopes}&redirect_uri={redirect_uri}&state={nonce}&grant_options[]={access_mode}

 

0 Likes
Tourist
10 1 0

Yes thank you for copying and pasting that from the docs page I linked. You use that URL and fill in the {variables} with your values, as I have done in my example URL from the first post.

 

With or without grant_options (which, if you read the docs carefully, you'll see that it can be omitted) in the URL, I'm getting a 404 error.

 

Is there another difference that I'm not seeing between the two?

0 Likes
Highlighted

Success.

Tourist
10 1 0

I'm an idiot I was missing /admin/ before the oauth. 

 

After multiple live chats and looking at it several times myself I never noticed it until now.

0 Likes