Hey team,
First time developing on Shopify. I am making a simple app that only needs a count for the number of customers and a count for the total number of orders.
Right now in development, I have been getting this data with a REST request:
const ordersResponse = await admin.rest.get({
path: “/admin/api/2024-10/orders/count.json”,
});
This is working. In my shopify.app.toml file, these are the scopes I have requested:
scopes = “read_orders,read_customers,read_all_orders”
First question - do I even need these scopes? From reading the API docs, it looks like I do Order - REST
But I thought I read somewhere else that simply getting the COUNT does not require these scopes?
I have requested the read_all_orders scope and I am waiting to hear back. I want to display a total order count so I think I need this scope to get more than 60 days of data.
Let’s say that I do need read_orders
and read_customers
just to get the counts. I am confused at the scopes I see when I try to install the app on a development store. I am trying to preview what a merchant would see.
Under View Personal Data, it is showing that I am requesting name, email address, phone, IP, etc etc.
Same with View Store Data, it is showing that I want to view all customer data and order data. I just want to see the counts.
I’d like to keep the scopes as limited as possible to avoid accessing data that I don’t need.
Am I thinking about this the right way? Any guidance would be appreciated!