Getting invalid_scope to request youtube.upload device code

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.

+4
source share
1 answer

Update: This issue has been fixed.

This area itself was not included in the white list for devices. Filed a request internally.

On the other hand, as explained here , Stackoverflow is for programming issues, you can use the public error tracker for error reporting or feature requests.

Feel free to print a bug report in the issue tracker to get an update on this issue.

+2
source

Source: https://habr.com/ru/post/1502917/


All Articles