Discussing Shopify Functions development, deployment, and usage in Shopify apps.
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" (https://shopify.dev/docs/api/admin-rest/2022-10/resources/user#get-users-current) 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?
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 Shopify.dev or the Shopify Web Design and Development Blog
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: