Questions and discussions about using the Shopify CLI and Shopify-built libraries.
Hello,
I'm trying to find a way to get the shop name inside the application running on Shopify admin, but I couldn't find anything so I thought someone here can help me.
I've developed the application using Shopify CLI and using NGrok to tunnel my local computer.
Thank you in advance!
I'm also interested in this
Hi @Kos78
You can access the shop name via the GraphQL shop object - https://shopify.dev/api/admin/graphql/reference/store-properties/shop#samples
# Get a shop's name and ID
{
shop {
name
id
}
}
Alternately, the shop name is also available in the REST API under the /admin/api/2021-07/shop.json endpoint - https://shopify.dev/api/admin/rest/reference/store-properties/shop
To learn more visit the Shopify Help Center or the Community Blog.