How can I automate preview share link generation via API?

How can I automate preview share link generation via API?

blip
Visitor
1 0 3

I have multiple developer stores and would like an automated way to generate Preview share links to easily show some new code without having to disable password or store each developers store password. 

 

When I open a preview of a theme I can get a link that works for 14 days to share with others, I basically just want to generate one of those links for a theme id by hitting the API.

 

Can this be added or does anyone have a workaround for getting that?

 

Replies 2 (2)

Evan_Ford
Shopify Partner
9 1 1

I really need this as well for an app I'm developing. Apps can't really interact with any of the theme's properties other than assets (files within the theme). I'd love to be able to grab the theme preview image (screenshot) as well as the theme preview link (or a way to generate the params to bypass the password page, even).

Eshan1
Shopify Partner
1 0 2

You can create the preview link yourself if you have the theme id and the domain name. Simply go to 

 

https://{{ store_domain }}/?_ab=0&_fd=0&_sc=1&preview_theme_id={{ theme.id }}