Get list of stores which have installed my app via API

Topic summary

Goal: Programmatically determine whether a specific shop has installed a public app and obtain a list of installs, ideally using only the shop’s myshopify.com domain (no per-shop access token), via the Shopify Partners GraphQL API.

  • Initial attempt: Querying app(id){ events(first:1, shopId:…) } works when a shop ID is known, but the requester only has the myshopifyDomain and seeks a way to derive the shop ID without an access token.

  • Community suggestion: Use a Partners API query for app events with types [RELATIONSHIP_INSTALLED, RELATIONSHIP_UNINSTALLED, RELATIONSHIP_DEACTIVATED, RELATIONSHIP_REACTIVATED], including pagination and occurredAtMin, returning shop { name, id, myshopifyDomain } to build an install list. (Code snippet is central.)

  • Latest update: The suggested approach fails with an API error: “Field ‘events’ doesn’t exist on type ‘App’,” indicating the events field is unavailable (removed or restricted), blocking this method.

  • Status and open questions: No confirmed method is provided to map myshopifyDomain to shop ID without a shop access token, nor to retrieve an install list purely via the Partners API. Multiple users requested updates; no resolution or workaround is confirmed.

Summarized with AI on December 19. AI used: gpt-5.

Shopify App Store requirements state that a merchant should only be able to install a publicly listed app through the Shopify App Store and not from anywhere else. I have a use case wherein I enable some functionality, post app installation, of my app through my backend and for that I need to know whether my app is installed on a given shop or not.

Is there a way where I can get this by making a request to some API or something like that, rather than manually downloading the list from the partners dashboard.

I tried solving this using the Partners Graph QL Api with the query -
{ app(id: partnerId) { id name events(first: 1, shopId: shopId) { edges { node { type app { id } occurredAt shop { id name myshopifyDomain } } } } } }

This works but the only issue is that I dont have the shop id with me, all I have is my shopify domain of a shop, so is there a way where I can get the shop ID of a shop using just the my shopify domain of the shop without having Access token for that shop.

Any help will be highly appreciated.

5 Likes

Have you got any solution for this, please post solution if you have any, Thanks

1 Like

Hi, I am also looking for this. Any update about this..?

Hi @hitanshu88 ,

maybe the following query to the partner api is useful for you

query getCustomerList($id:ID!,$occurredAtMin:DateTime!, $cursor: String!){
  app(id: $id) {
    name
    apiKey
    id
    events(first: 100,
         after: $cursor,
         occurredAtMin: $occurredAtMin,
         types:[RELATIONSHIP_UNINSTALLED,RELATIONSHIP_INSTALLED,RELATIONSHIP_DEACTIVATED,RELATIONSHIP_REACTIVATED])
      {
      edges {
       node {
         occurredAt
         shop {
           name 
           id 
           myshopifyDomain
         }
         type
       }
       cursor
      }
      pageInfo {
      hasNextPage
      hasPreviousPage
      }

      }
  }  
}

sadly,

{
  "errors": [
    {
      "message": "Field 'events' doesn't exist on type 'App'",
      "locations": [
        {
          "line": 6,
          "column": 5
        }
      ],
      "path": [
        "query",
        "app",
        "events"
      ],
      "extensions": {
        "code": "undefinedField",
        "typeName": "App",
        "fieldName": "events"
      }
    }
  ]
}