Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

Can't create bulk report for YouTube Content Owner Estimated Revenue Report? Permission Denied? Scopes All Approved

$
0
0

I'm trying to pull this report from the YouTube Analytics API: content_owner_estimated_revenue_a1

But I am getting the following error:

'error': {'code': 403, 'message': 'The caller does not have permission', 'status': 'PERMISSION_DENIED'}

These are the approved scopes I currently have in the credentials of my request (In the code example below, self.token / is an access token generated from OAuthing a Google user / brand account):

"scopes": ["https://www.googleapis.com/auth/userinfo.email, https://www.googleapis.com/auth/yt-analytics.readonly, https://www.googleapis.com/auth/yt-analytics-monetary.readonly, https://www.googleapis.com/auth/youtube.readonly"]

What am I missing?

I tried to make the request to generate the bulk report. I got the error given above.

Here's a quick extract of my Python class:

    response = self.session.request(        method='POST',        url='https://youtubereporting.googleapis.com/v1/jobs',        headers={'Accept': 'application/json','Authorization': 'Bearer '+ self.token,        },        json={'reportTypeId': 'content_owner_estimated_revenue_a1','name': 'content_owner_estimated_revenue_a1',        },    )

OR

curl -X POST \  https://youtubereporting.googleapis.com/v1/jobs \  -H 'Accept: application/json' \  -H 'Authorization: Bearer <TOKEN>' \  -H 'Content-Type: application/json' \  -d '{"reportTypeId": "content_owner_estimated_revenue_a1","name": "content_owner_estimated_revenue_a1"  }'

Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>