Scopes for Analytics (read_reports, read_all_orders)

bvvliet
Shopify Partner
1 0 0

Hi,

 

When trying to receive information from the analytics API we are prompted to request access to read_all_orders and read_reports.

 

We have done this for read_all_orders, but now we have same for: read_reports.

 

However we are just trying to aggregate the counts for months, days etc.

 

Error in question:

 

Access denied for shopifyqlQuery field. Required access: `read_reports` access scope. Also: Level 2 access to Customer data including name, address, phone, and email fields. Please refer to https://shopify.dev/apps/store/data-protection/protected-customer-data.

 

This is the query that I'm sending:

{
  shopifyqlQuery(query: "FROM orders SHOW sum(orders)") {
    __typename
    ... on TableResponse {
      tableData {
        unformattedData
        rowData
        columns {
          name
          dataType
          displayName
        }
      }
    }
    parseErrors {
      code
      message
      range {
        start {
          line
          character
        }
        end {
          line
          character
        }
      }
    }
  }
}

It doesn't sit nice with me that I need to request access to "Level 2 access to Customer data including name, address, phone, and email fields.", I never need access to this information.

 

Any other way to do this?

 

Reply 1 (1)

Tatjana88
Shopify Partner
2 0 0

Hi @bvvliet, did you ever find other way to do this?