Doubt with the redirect_uri after installing an app

Solved

Doubt with the redirect_uri after installing an app

Javi-Dev
Tourist
5 0 2

Hi everyone!

I'm currently developing an app that will be published in the Shopify App Store.
At the momento i'm installing my app with this installation link sintax:

 

https://[shopName].myshopify.com/admin/oauth/authorize?client_id=[CLIENT_ID]&scope=[SCOPE]&redirect_uri=[REDIRECT_URI]&state=[STATE]

So i can establish the redirect uri after the installation and receive the path parameters:

code, hmac, host, shop, timestamp
In order to use them to request and get the access-token.

But i dont know if i can set the redirectUri when my app is publish.
Is there any default redirectUri? In that case what is the value?
Can i set the redirectUri?

Looking forward to your help
Thank you in advance!

Accepted Solution (1)

ShopifyDevSup
Shopify Staff
1453 238 508

This is an accepted solution.

Hey @Javi-Dev thanks for getting in touch- there isn't a default value for the URI redirect field, so you would have to set that yourself in the actual installation link you send to the shop. Like you mentioned, this URL is used to receive the auth code to grant your app the requested permissions on a shop, so this does need to be set. You can easily set up a whitelisted redirection URL in your Shopify Partner's Dashboard one you've logged in though, which is needed to set up the redirect URI. Here are some steps:

 

  1. Click on "Apps" in the left sidebar.
  2. Select the app you're working on.
  3. In the "App setup" section, you'll find the "App URL" and "Whitelisted redirection URL(s)" fields.
  4. Add or update the URLs in the "Whitelisted redirection URL(s)" field as needed. Make sure they match the redirect_uri parameter you're using in your installation link.
     

This guide here on OAuth might help provide a few more steps to clarify the process if you wanted to take a look. Hope this helps, please feel free to reach out to us again here if we can clarify anything. 

Al | Shopify Developer Support 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 2 (2)

Javi-Dev
Tourist
5 0 2

Any clue?

ShopifyDevSup
Shopify Staff
1453 238 508

This is an accepted solution.

Hey @Javi-Dev thanks for getting in touch- there isn't a default value for the URI redirect field, so you would have to set that yourself in the actual installation link you send to the shop. Like you mentioned, this URL is used to receive the auth code to grant your app the requested permissions on a shop, so this does need to be set. You can easily set up a whitelisted redirection URL in your Shopify Partner's Dashboard one you've logged in though, which is needed to set up the redirect URI. Here are some steps:

 

  1. Click on "Apps" in the left sidebar.
  2. Select the app you're working on.
  3. In the "App setup" section, you'll find the "App URL" and "Whitelisted redirection URL(s)" fields.
  4. Add or update the URLs in the "Whitelisted redirection URL(s)" field as needed. Make sure they match the redirect_uri parameter you're using in your installation link.
     

This guide here on OAuth might help provide a few more steps to clarify the process if you wanted to take a look. Hope this helps, please feel free to reach out to us again here if we can clarify anything. 

Al | Shopify Developer Support 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog