Get list of stores which have installed my app via API

hitanshu88
Shopify Partner
12 1 10

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.

Replies 3 (3)

Ajay122
Shopify Partner
2 0 1

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

Sahood
Shopify Partner
6 0 0

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

tewe
Shopify Partner
244 46 102

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
      }

      }
  }  
}
• Was my reply helpful? Click Like to let me know!
• Was your question answered? Mark it as an Accepted Solution
• Check out our Price Updater App