Choose distribution programatically

Topic summary

Developer building a tool for merchants wants to set a Shopify app’s distribution to “Custom” programmatically and then generate an install link for a specific merchant store. Custom distribution refers to apps intended for a single merchant rather than public App Store distribution.

They cannot find an API or documented method to:

  • Select the app distribution type as Custom via code.
  • Input a merchant’s store URL and obtain the corresponding install link.

No responses or solutions are provided yet; no code or attachments are included.

Status: Open/unanswered.

Key questions remain:

  • Does Shopify offer an API or endpoint to programmatically set app distribution to Custom?
  • What is the supported way to generate a merchant-specific install link from a store URL via API?
Summarized with AI on December 23. AI used: gpt-5.

I am building a tool that helps merchants create custom apps

I am stuck to a point where I cant find anything that can help me do following:

  • Choose Distribution (Custom in my case)
  • And then put merchants link and get install link

Help?

I also trying similar things.
I didn’t find automate option to choose distribution but I found way to generate installation link.

here is an example from node.js

function generateInstallLink(shop, clientId) {

  const redirectUri = encodeURIComponent("https://shopify-dev-tunnel.xubitar.com/api/auth/callback");

const state = crypto.randomUUID(); // save this to verify later


return `https://${shop}/admin/oauth/authorize` +
`?client_id=${clientId}` +
`&scope=${encodeURIComponent("read_products,write_products")}` +
`&redirect_uri=${redirectUri}` +
`&state=${state}`;
}
1 Like