So I’ve tried the following query in GraphiQL app and can see the installation { launchUrl }
{
catalogs(first: 25, type: APP) {
nodes {
id
title
... on AppCatalog {
apps(first: 1) {
nodes {
id
handle
installation {
launchUrl
}
title
icon {
url
}
}
}
publication {
id
name
}
}
}
}
}
But obviously when using my own access token these don’t come through, I can get other data though around the app/sales channels, except that launchUrl, is there anyway to get these at all?
Hey Luke! Your query is fine and the launchUrl field does exist on AppInstallation. Accessing the installation field on other apps however (not your own) requires the read_apps access scope, which is a restricted scope that needs approval from Shopify Support.
Without it, installation will return null for any app other than yours, which is why launchUrl doesn’t come through.
What type of app are you building, and what’s the use case for needing the launch URLs of other installed apps? That’ll inform the path forward - cheers!
Hey @Donal-Shopify, I was trying to replicate the sales channels popover Shopify has on the products listing page It also seems Shopify uses an SVG for the icons but icon { url } would only return a PNG.
Ah, makes sense! Given the read_apps requirement though, going static is the pragmatic call.
On the icon format, you’re right that icon { url } returns a PNG. The SVGs you see in the admin are internal assets that aren’t exposed through the API, so there’s no way to pull those for third-party apps either as far as I can see