Hello!
I’m trying to fetch some analytics data for one of the accounts I have access to.
I created an API Token with the following permissions:
XYZ - Stream:Read
All zones - Analytics:Read
When I query the GraphQL endpoint, I receive an auth error:
{
"data": null,
"errors": [
{
"message": "not authorized for that account",
"path": [
"viewer",
"accounts"
],
"extensions": {
"code": "authz",
"timestamp": "2020-12-20T16:18:51.921589029Z"
}
}
]
}
The query I used:
query {
viewer {
accounts(filter: {
accountTag:"$ACCOUNT_ID"
}) {
videoPlaybackEventsAdaptiveGroups(
filter: {
date_geq: "2020-09-01"
}
orderBy: [uid_ASC]
limit: 1000
) {
count
sum {
timeViewedMinutes
}
dimensions {
uid
}
}
}
}
}
I checked the account tag and auth token. Both should be valid. I also have access to the XYZ account.
Am I missing some particular permission for the token?
Thank you!