getting analyticsToken via graphql query

Highlighted
Shopify Staff
Shopify Staff
181 22 29

Hey @mikitski 

You are correct, I don't believe it's possible to use OAuth with a private app. You would likely need to create an app through the partners dashboard and then be able to use OAuth to request the required analytics scope. 

Kevin_A | Developer Support @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Click Accept as Solution 

0 Likes
Highlighted
New Member
7 0 0

hey @Kevin_A 

I'm trying to get custom app authorized with reports_editing scopes and getting an error "Oauth error invalid_scope: The access scope is invalid: reports_editing"

https://<mydevstore>.myshopify.com/admin/oauth/request_grant?client_id=<my_app_access_code>&redirect_uri=<my_redirect_url>&scope=read_customers%2Creports_editing&state=12345

if I replace that reports_editing scope with something like read_orders instead, the link works, but that's obviously not what I need for Analytics API.

I'm also getting the same scope error when I'm trying to install the custom app in our production store, which is a Shopify Plus store.

What is the right scope should I request for Analytics API.

Thanks,

 

 

0 Likes
Highlighted
New Member
7 0 0

btw, I also tried installing the app with the read_analytics oAuth scope (which is also mentioned int he Analytics API docs)  but still getting the same "analytics_token access denied" error requesting analyticsToken via graphql query.

 

so what are the right oAuth scopes do I need to be able to get analytics token?

0 Likes
Highlighted
New Member
13 0 0

Have you solved ? help me pls

0 Likes
Highlighted
Shopify Partner
100 16 30

Hi @mikitski,

Basically this should work with your private app credentials with permissions to Analytics. Since you are on a Shopify Plus plan, I will suggest you to just contact your merchant success manager to see what's wrong. Sometimes they have to activate 'things' on their side for 'things' on your side to work.

0 Likes
New Member
13 0 0

Can you be more specific @Jayvin  

0 Likes
Highlighted
Shopify Partner
100 16 30

Hi,

There are some app scopes that need to be activated by your store manager and since you are on a Shopify Plus plan, you have access to support, so please contact them.

0 Likes
Highlighted
New Member
13 0 0
Can you be more specific pls
0 Likes