0
votes

I am currently implementing a TV app (basically for Samsung and LG TVs) that should display videos and images from my Google Drive account. I am using OAuth 2.0 for TV and Limited-Input Device Applications to get access to the Google Drive API: https://developers.google.com/identity/protocols/OAuth2ForDevices.

Because of the fact that only the scope "https://www.googleapis.com/auth/drive.file" (View and manage Google Drive files and folders that you have opened or created with this app) is available for this OAuth 2.0 flow, it is not possible to access any videos or images that I have uploaded with another app (e.g. Google Drive web app).

If a try to use the scope "https://www.googleapis.com/auth/drive.readonly" (See and download all your Google Drive files), I am receiving the error "invalid_scope".

I would be happy for any help.

1

1 Answers

1
votes

I found a solution that I would like to share.

I could solve this issue by using OAuth 2.0 for Web Server Applications (https://developers.google.com/identity/protocols/OAuth2WebServer) (which allows the scope "https://www.googleapis.com/auth/drive.readonly") and by simply adopting the flow for OAuth 2.0 for TV and Limited-Input Device Applications (https://developers.google.com/identity/protocols/OAuth2ForDevices).

This solution is quite complex, because the enitre OAuth 2.0 flow for exchanging the access token has to be implemented on your own and you have to make sure it is protected and secure. In the end it will work, but it will cost a lot of effort.

Here is a link to my final solution: http://gd.msx.benzac.de.