Deep link for app embed activation

Solved

Deep link for app embed activation

Ido1425
Shopify Partner
26 0 3

Hi everyone!
I facing an issue with my deep link.
The link porpuse is to redirect the user from the app to activation of the app in the app embed in the theme editor so he only needs to click save in theme editor.
The link it self redirect the user to the current page but "app embed does not exist” error is shown and the activation doesn’t work.
Would really appreciate help!

The link structure:

https://${domain}/admin/themes/current/editor?context=apps&activateAppId=${extentionUuid}/app-embed

‏צילום מסך 2024-06-11 ב-17.08.52 2.png

 The app is in development - the link never worked perfectly.

Accepted Solution (1)
Huptech-Web
Shopify Partner
961 192 202

This is an accepted solution.

Hello @Ido1425 

themeEditorId: Yes you can add the current theme id then it will redirect yours to the live theme.
EXTENSION_ID: If you are using Shopify CLI, running the npm run deploy command in your root project will create an extension ID for you in the .env file. make sure you have a .env file in your project.
EXTENSION_NAME: your extension file name.
I have made a small change to the URL to correct some minor errors. please use the below URL.

 

 

https://admin.shopify.com/store/${shopName}/themes/${themeEditorId}/editor?context=apps&template=index&activateAppId=${EXTENSTION_ID}/${EXTENSTION_FILE_NAME}

 

 

 

If the solution presented meets your needs and addresses your query effectively, I encourage you to accept it as the chosen answer. This will acknowledge the support you received and aid fellow community members in identifying reliable and effective solutions for their similar concerns.
Thank you.

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at [email protected] or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

View solution in original post

Replies 9 (9)

Huptech-Web
Shopify Partner
961 192 202

Hello @Ido1425 

You can use the below URL For App embed activation.

https://admin.shopify.com/store/${shopName}/themes/${themeEditorId}/editorcontext=apps&template=index&activateAppId=${EXTENSION_ID}/${EXTENSION_NAME}

 

In this link:

themeEditorId is obtained via the admin REST API theme.json.
EXTENSION_ID is Enter Your theme app extension id.
EXTENSION_NAME is your theme app extension name.

 

If the solution presented meets your needs and addresses your query effectively, I encourage you to accept it as the chosen answer. This will acknowledge the support you received and aid fellow community members in identifying reliable and effective solutions for their similar concerns.
Thank you.

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at [email protected] or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
Ido1425
Shopify Partner
26 0 3

themeEditorId - Is it ok to write "current"?

EXTENSION_ID - Is it has to be the uuid I found in the inspector?

EXTENSION_NAME - In name you refer to the extension handle that I can see in the partner dashboard in the extensions section of the app?

 

Example of url I created and it doesn't work:

https://admin.shopify.com/store/${storeName}/themes/current/editorcontext=apps&template=index&activateAppId=6f6ac5ed-3743-****-****-09930c******/${extention-handle}
Huptech-Web
Shopify Partner
961 192 202

This is an accepted solution.

Hello @Ido1425 

themeEditorId: Yes you can add the current theme id then it will redirect yours to the live theme.
EXTENSION_ID: If you are using Shopify CLI, running the npm run deploy command in your root project will create an extension ID for you in the .env file. make sure you have a .env file in your project.
EXTENSION_NAME: your extension file name.
I have made a small change to the URL to correct some minor errors. please use the below URL.

 

 

https://admin.shopify.com/store/${shopName}/themes/${themeEditorId}/editor?context=apps&template=index&activateAppId=${EXTENSTION_ID}/${EXTENSTION_FILE_NAME}

 

 

 

If the solution presented meets your needs and addresses your query effectively, I encourage you to accept it as the chosen answer. This will acknowledge the support you received and aid fellow community members in identifying reliable and effective solutions for their similar concerns.
Thank you.

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at [email protected] or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
Ido1425
Shopify Partner
26 0 3

I am using the gadget.dev platform, do you know how I can get that info?

Thank you for the explanation!

Huptech-Web
Shopify Partner
961 192 202

@Ido1425  

can you describe which exactly info you want EXTENSION_ID or something else?

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at [email protected] or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
Ido1425
Shopify Partner
26 0 3

I am not sure I understood your question.

I have tried to use the UUID and the id of the app in the url of the partners dashboard 

I want to prevent the error and that the deep link will activate the app so the user only need to click save

Ido1425
Shopify Partner
26 0 3

I assume the issue relies on the extension ID or the extension file name because I’m not sure which information to use for that

Huptech-Web
Shopify Partner
961 192 202

For the extension ID and extension file name you can contact Gadget, they will provide you the extension ID and file name. After you get this detail you simply add this info to the URL and you will be redirected to the theme editor with the preselected extension.

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at [email protected] or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

attaboiaj
Shopify Partner
30 4 16

Current accepted solution is old and now you don't need a theme scope or anything like that

simple deep link would work as suggested here

https://shopify.dev/docs/apps/build/online-store/theme-app-extensions/configuration#app-embed-block-...

const themeEmbedURl = `https://${shop}/admin/themes/current/editor?context=apps&activateAppId=${EXTENSION_ID}/${EXTENSION_NAME}`;

 

EXTENSION_ID =====> generated automatically and save inside .env file when you run `yarn deploy`
EXTENSION_NAME ====> Must be a name your liquid file