Redirect After Installation

yingmu52
Shopify Partner
1 0 0

Hi, I am building a Shopify app and the app got rejected, one of the reasons is app redirect after installation. 

the installation callback returns an Http status code 301.

{
      statusCode: 301,
      headers: { 
           Location: "https://www.google.com"
     },
      body: "ok"
};

the problem is, during the first installation, it redirects the entire page to the `Location`. But if you open it from the Shopify Admin dashboard. the page is locked inside an iFrame. 

How do I keep this consistent ?? can someone teach me how to
- redirect back to an iFrame (both first install and open from within admin dashboard)
- redirect the page to a new tab (same as above)


THANK YOU!!!

Replies 5 (5)
hassain
Shopify Staff (Retired)
Shopify Staff (Retired)
624 104 185

Hi @yingmu52 

 

If you would like to keep the user experience consistent so that the Shopify merchant is redirected to the iFrame both after first install and after opening it from the Shopify Admin Dashboard, then after the successful installation of your app you should redirect the merchant to the URL of "https://{merchant-shopify-domain}.myshopify.com/admin/apps/{your-app-api-key}"

 

 

 

 

Hassain | Developer Support Specialist @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

umairakram
Shopify Partner
14 1 2

hi @hassain 

 

I am redirecting my app to the URL: "https://{merchant-shopify-domain}.myshopify.com/admin/apps/{your-app-api-key}" but it returns me an error i.e. "{merchant-shopify-domain}.myshopify.com redirected you too many times". I have attached a snapshot, please help me with how to stop this redirection loop?

Capture.PNG

sadek-39
New Member
3 0 0

I am having same problem. Please give me a solution. After installation i need to redirect my app in index file. But I cant do it. When I am redirecting /admin/apps ,after that my app is refused to connect. Give me  a solution

umairakram
Shopify Partner
14 1 2

it was our technical problem. We are checking if the domain is already in the database, if not it redirects to installation. please check your conditions carefully. 

sadek-39
New Member
3 0 0

Can you solve this problem? When I am redirecting to index.php, it was going to out of iframe. When redirecting to 'admin/apps' ,it said that could not respond.

It was a requirement for app listing on shopify for embedded apps. Could you please help me?

 

problem.PNG