Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Shopify staff API / Webhook

Solved

Shopify staff API / Webhook

shivkumar_2512
Shopify Partner
5 0 0

Hi

 

My current project involves getting the user data of the staff users that are added in a store.
So far I have found 

1) A rest API that is available only for private / custom apps on a plus store. (https://shopify.dev/api/admin-rest/2022-04/resources/user)

2) A graphql API that gives data of a staffMember. (https://shopify.dev/api/admin-graphql/2022-04/objects/staffmember).

 

For the graphQL API it is not mentioned in the document if this is applicable for private or public app. Can you please help me confirm this.

The staffMember API seems to give data only of a particular staff and not the entire set of staff users.

Also, please let me know if there is any other way to get the staff data.

 

Thanks

Accepted Solution (1)

Alan
Shopify Staff
129 15 25

This is an accepted solution.

Hey @shivkumar_2512 - thanks for getting in touch. These are great questions. Generally, we don't surface too much information about staff members for privacy purposes, but you could pull a larger list of staff members using the staffMembers connection under the "shop" object, which would look something like this in GraphQL:

{
  shop {
    staffMembers (first:5) {
      edges {
        node {
          id
          name
          isShopOwner
        }
      }
    }
  }
}


In terms of the app being private or public, my understanding is that the "read_users" scope is only available for custom/private apps on Advanced plan or Shopify Plus stores. This is mentioned in the documentation for the user endpoint in REST, but I'm going to make a note to send up to the team that handles our documentation to see if it's possible to add this messaging to the GraphQL documentation as well.

 

Hope this helps with next steps and best of luck with your app. 

 

Cheers!

Alan | 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

View solution in original post

Replies 4 (4)

Alan
Shopify Staff
129 15 25

This is an accepted solution.

Hey @shivkumar_2512 - thanks for getting in touch. These are great questions. Generally, we don't surface too much information about staff members for privacy purposes, but you could pull a larger list of staff members using the staffMembers connection under the "shop" object, which would look something like this in GraphQL:

{
  shop {
    staffMembers (first:5) {
      edges {
        node {
          id
          name
          isShopOwner
        }
      }
    }
  }
}


In terms of the app being private or public, my understanding is that the "read_users" scope is only available for custom/private apps on Advanced plan or Shopify Plus stores. This is mentioned in the documentation for the user endpoint in REST, but I'm going to make a note to send up to the team that handles our documentation to see if it's possible to add this messaging to the GraphQL documentation as well.

 

Hope this helps with next steps and best of luck with your app. 

 

Cheers!

Alan | 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

shivkumar_2512
Shopify Partner
5 0 0

Hi @Alan , Thanks for the quick response! 

LisaGRM
Shopify Partner
1 0 0

Hi Alan, 

Do you have any idea when the "read_users" scope will be available for public apps to use? Seems like there are lot of devs trying to use it, including ourselves, so it would be a worthwhile thing to perhaps prioritize. 

 

 

StaffCollab
Shopify Partner
2 0 0

Hi Alan.

I appreciate your clear response.

However, in my situation, I'm not interested in any data from the staff members but I want to know on my app which member is currently using this app.

It may be a random ID without any info on the staffer, I just want to be able to customize the app dashboard so that every time someone opens his dashboard he should see the state where he left off.

Let me know if there is any workaround to make this happen.

Regards

Dave