How to retrieve shop name in client application

Kos78
Visitor
2 0 0

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!

Replies 2 (2)

DanielGabe
Visitor
1 0 0

I'm also interested in this

csam
Shopify Staff (Retired)
267 40 51

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.