Jquery Ajax get products works on test site but not production site

New Member
15 0 0

I can access it when I use '/admin/price_rules/399675654231.json' as my URL from development store. However not when I take the admin part off. My guess is the admin is needed to access this object but with the url redirect I can't use admin in production.

Shopify Partner
462 80 92



For security reason you can't access those infos from front-end, you will need custom app and third part server, where you can keep api pass and key and then do requests to admin, but not direct from theme.

Because if you able to do this, everyone will do this, just pasting the ajax call in browser console and get all admin info... this is nonsense )))

Author: Hovhannes Sargsyan (aka sarhov).
An individual web developer focused on Shopify development.
Need more help? Feel free to send me a direct message or drop an email shopify@sarhov.com

Website: https://sarhov.com  
Email: shopify@sarhov.com
Skype: @sarhov
Messenger: @sarhov
Telegram: @sarhov
New Member
15 0 0

Yes of course I do not want to pass and sensitive information through the browser. I was excited I could access price_rules through the test site by using the url Admin and not having to put in any API keys or passwords. I will now rework the project so I can access that data through a private application and 3rd party server.


Thank you