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

Google Youtube Analytics API: 403 forbidden error despite valid token

$
0
0

So, I have a valid OAuth token for a channel. When the token expires, it is automatically refreshed. This token works for requests to gdata.youtube.com, but for some reason is denied to www.googleapis.com/youtube/analytics/v1/reports.

The scope used to get the token is https://gdata.youtube.com https://www.googleapis.com/auth/yt-analytics.readonly https://www.googleapis.com/auth/youtubepartner

This works for other channels but not the one in particular.

GET www.googleapis.com/youtube/analytics/v1/reports  PARAMS    ?metrics=views&ids=channel==...&start-date=...&end-date=...  HEADER    Authorization: Bearer ...  RESPONSE    {"error": {"errors": [          {"domain": "global","reason": "forbidden","message": "Forbidden"          }        ],"code": 403,"message": "Forbidden"      }    }

Edit: it should be noted that when you call www.googleapis.com/youtube/analytics/v1/reports with insufficient scope, you get this error:

{domain:global, reason:insufficientPermissions, message:Insufficient Permission}

This is a completely different error from the 403 forbidden one.


Viewing all articles
Browse latest Browse all 3831

Trending Articles



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