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

"403 Forbidden" error with Youtube Analytics API using service account

$
0
0

I'm currently trying to get a Youtube Analytics API to work to retrieve video data from my Youtube channel, I'm doing this using Postman to send HTTPS requests.

It works fine with classic Oauth2 authentication (give the secret id and client id to receive the token). But it requires human intervention to authenticate which I would like to avoid, so I decided to do this using a service account. I created one (I am the only user and so have the owner statut on it) and managed to generate a access token from the JWT, but when I use this token in the Youtube Analytics API request, I get a "403 Forbidden" error that I don't really understand.

Youtube Analytics API is enabled on my Google Cloud Console, I can see the service account in the list of compatible credentials. I use the same scope as for classic authentication "https://www.googleapis.com/auth/yt-analytics.readonly". I really don't understand why I have this error with the service account token when the classic authentication token works next.

Thanks in advance for the help !


Viewing all articles
Browse latest Browse all 3831

Trending Articles



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