Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi
I'm developing an app that has several pages. Should I include the query parameters such as (host,shop,hmac) in every link? Is there a better way to do it?
Thank you
Solved! Go to the solution
This is an accepted solution.
Hi @tunisoft25
Yes, you should include the host and shop parameters in every link to maintain authentication and ensure a smooth user experience. Shopify uses these parameters to verify the session and keep the app embedded within the admin panel.
But a better approach is to use Session Tokens instead of relying on URL parameters. Shopify recommends using session tokens for authentication because they provide better security and prevent issues with expired or invalid query parameters. You can retrieve the session token on each page load and authenticate it with Shopify's App Bridge and JWT authentication.
If your app is embedded, use Shopify App Bridge's authenticatedFetch() to securely process API calls without manually passing parameters
This is an accepted solution.
Hi @tunisoft25
Yes, you should include the host and shop parameters in every link to maintain authentication and ensure a smooth user experience. Shopify uses these parameters to verify the session and keep the app embedded within the admin panel.
But a better approach is to use Session Tokens instead of relying on URL parameters. Shopify recommends using session tokens for authentication because they provide better security and prevent issues with expired or invalid query parameters. You can retrieve the session token on each page load and authenticate it with Shopify's App Bridge and JWT authentication.
If your app is embedded, use Shopify App Bridge's authenticatedFetch() to securely process API calls without manually passing parameters
Thank you
I used the token with POST requests and it worked fine. I got the token through the app bridge.
Can I pass the token as a query parameter in the URL or does it only work as an authentication header?
Thank you
You can got those information shop shop information. In URL that is not necessary other thank hmac , if you have no special need in url.
Syncora: Backup & Restore [Free] - Automated real-time store backup with one-click easy restore.
Slider Revolution - Create sliders, theme sections, banners, videos, pages, advanced animation, and social feeds.
Essential Grid Gallery - Create photo galleries, video galleries, portfolio galleries, product gallery, collection gallery, and more.
EasyDisplay: Product Showcase - Easily display collections, related products, discounts, recently viewed items, and best sellers.
Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025