How to retrieve shop name in client application

Kos78
New Member
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!

0 Likes
DanielGabe
New Member
1 0 0

I'm also interested in this

0 Likes
csam
Shopify Staff
Shopify Staff
34 5 4

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

 

 

CS | API Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes