0
votes

This maybe a simple (stupid) question but at this point, I just do not get it.

I'm able to connect to the scope drive.file with :

curl -d 'client_id='$idclient'' -d 'scope=https://www.googleapis.com/auth/drive.file' -d 'response_type=code' 'https://accounts.google.com/o/oauth2/device/code'

But, when I want to connect to the scope file, I got "error": "invalid_scope" as result.

But as we can see on this screenshoot, this scope is enable with my app in Google OAuth page : Scope permission in my account

So, how to connect to to the scope https://www.googleapis.com/auth/drive ?

Thank you

2

2 Answers

0
votes

I suppose you are using "Oauth 2.0 for TV and Limited-Input Device Applications". As you can see in the top "Note" from the documentation:

Important note: This OAuth 2.0 flow supports a limited set of scopes.

It leads us to the "Allowed Scopes" section, and regarding the Drive API (Drive File API here), we only have this scope available:

https://www.googleapis.com/auth/drive.file

0
votes

Apparently, the API I want to use is "restricted" : OAuth 2.0 scope information for the Drive API