How can a custom application get the online domain names of a store using it?

Solved

How can a custom application get the online domain names of a store using it?

pmaierean
Shopify Partner
6 2 0

We are developing a public app for Shopify App Store. The app has a page that is loaded embedded in a Store admin page to allow the merchant to make use of its functionality as well as theme extensions to allow for new functionality on the merchant's online store.

To protect the app backend from non authorized use, is there a way for it to obtain a list of valid domains of the merchant's online store?. Can this be done though API or by asking the merchant explicitly about them?

Accepted Solution (1)

pmaierean
Shopify Partner
6 2 0

This is an accepted solution.

Found it. The https://shopify.dev/docs/api/admin-graphql/2024-04/objects/queryroot#field-queryroot-shop has the response I was looking for. The result from a sample grapql query that can be run from https://shopify.dev/docs/api/graphiql-admin-api can be seen in the snapshot below.

 

pmaierean_0-1717064913667.png

 

View solution in original post

Reply 1 (1)

pmaierean
Shopify Partner
6 2 0

This is an accepted solution.

Found it. The https://shopify.dev/docs/api/admin-graphql/2024-04/objects/queryroot#field-queryroot-shop has the response I was looking for. The result from a sample grapql query that can be run from https://shopify.dev/docs/api/graphiql-admin-api can be seen in the snapshot below.

 

pmaierean_0-1717064913667.png