I am trying to use the Youtube data API from the application, and I would just like to request permission to download the video, and not manage the entire Youtube account.
When I try to request an access token for the https://www.googleapis.com/auth/youtube.upload area , I will return to the error by stating that this is an invalid area. I gave permission to use the Youtube v3 data API.
According to youtube v3 docs, these are the supported areas: https://www.googleapis.com/auth/youtube - YouTube account management. https://www.googleapis.com/auth/youtube.readonly - view your YouTube account. https://www.googleapis.com/auth/youtube.upload - Upload a YouTube video and manage your video on YouTube.
The only one of these 3 that works for me is " https://www.googleapis.com/auth/youtube ".
This is the query I'm trying to do:
curl -d "client_id=id&scope=https://www.googleapis.com/auth/youtube.upload" https://accounts.google.com/o/oauth2/device/code
And this is the answer:
{ "error" : "invalid_scope", "error_description" : "Not authorized to request the scopes: [https://www.googleapis.com/auth/youtube.upload]", "error_uri" : "http://code.google.com/apis/accounts/docs/OAuth2.html" }
I think that maybe this type of request just doesn't work for device codes? The youtube.upload workspace request works fine on the oauth2 playground.
source share