getting analyticsToken via graphql query

Highlighted
New Member
7 0 0

Hi All,

 

I'm trying to get analytics token via simple graphql query from my private app

query {shop{id analyticsToken}}

but getting "analytics_token access denied" error in response. App has Analytics Read Access (read_analytics scope) enabled.

 

What other permissions do I need to set to be able to get analyticsToken?

 

Thank you,

 

Mikitski

0 Likes
Highlighted
New Member
13 0 0
Have you solved it
0 Likes
Highlighted
New Member
7 0 0

no, no progress yet unfortunately.

don't think spamming the board will help solve it any faster though

0 Likes
Shopify Partner
100 16 30

Hi,

From what's mentioned hereTo access the Analytics API, a shop must have the advanced report builder feature, included in the Advanced Shopify plan and up. In the API, this feature is called reports_editing.

Highlighted
New Member
13 0 0

QQ截图20200922210842.png

 

QQ截图20200922214239.png

Why can't I get the token

 

QQ截图20200922211147.png

 

pls

0 Likes
Highlighted
New Member
13 0 0

???

0 Likes
Highlighted
Shopify Staff
Shopify Staff
181 22 29

Hey @mikitski 

You need to request the correct scope during the OAuth process on installation to a shop. I outlined some more information in this post: https://community.shopify.com/c/Shopify-APIs-SDKs/what-should-i-do-pls/m-p/888021/highlight/false#M5...

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

Thank you Jayvin for the pointer. We are on Plus though, so should have this included. I set the write_reports permission, but still getting the same error. I guess it's not the right one. Imma go hunt down the reports_editing... Any hints on where to set it?

0 Likes
Highlighted
New Member
7 0 0

Thank you @Kevin_A . Imma go check out your posts and report back... Hoping we can figure that out soon

0 Likes
Highlighted
New Member
7 0 0

@Kevin_A ,

just to clarify - this is a private app here. we built this private app to pipe the shopify data for our store into our enterprise datalake for the needs of integrated analytics and reporting. integration with regular REST APIs works great, but not with Analytics API.

Shopify private apps don't support oAuth. I just went thorough the oAuth steps anyway just to confirm, and getting "Oauth error invalid_request: The Shopify API application does not support oauth"

is there any other way to get authorized for the required Analytics API scopes for the private app?

Thanks,

Mykyta

0 Likes