How can we get the logged-in Shopify Admin users in our custom app ?

Shopify Partner
5 0 1

We have built custom app for our client (Shopify Plus merchant account) through which our client creates and modifies draft orders using shopify admin graphql API. Our client has some staffs who manages these operations. Now our client wants to track whoever made some changes (i.e. creates or modifies) to the draft orders through this custom app. So we need to access currently logged admin staff in our custom app. And to do that we have added 'read_users' scope to our already installed app scopes. Currently to access logged users we are using "Retrieves the currently logged-in user" ( API. Event after getting permissions from Shopify Plus Support regarding 'read_users' access scope for our app, we are still getting this API error -- '[API] This action requires merchant approval for read_users scope.'. When we contacted our client regarding this permission, our client found no option in his admin panel to give permission to our app. We have earlier created this custom app from our partners account. Any ideas regarding this situation i.e. to access currently logged admin staff from custom app?

Replies 2 (2)

Shopify Staff
1357 225 475

Hi @mrinmoy_dev 👋


The `/users/current.json` endpoint  returns the user account associated with the access token used to make the API request. Namely, the access token must be created for a specific user of the shop, using online access mode


Hope that helps!

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit or the Shopify Web Design and Development Blog

Shopify Partner
7 0 0

Wondering if there is a way to make this REST API call when I'm inside the Admin UI Extension? 

This is what I tried: 

const response = await fetch("shopify:admin/api/users/current.json")
It is giving me this error 
"InsecureUrlError: URL must be secure (HTTPS)
at wrappedFetch"