Use Google Picker without signing in to your Google Account (using OAuth)

Can I introduce Google Picker to a user who is not logged in with my Google account? I would like to allow the user to select files from a shared Google Drive in the Google account of my website. I can access these files using OAuth on the server. But is it also possible to submit files using Google Picker? Perhaps using this method:

PickerBuilder.setOAuthToken(string) 

Sets the OAuth token to authenticate the current user. Depending on the scope of the token, only certain types of data are displayed. Valid areas are Google Docs, Drive, and Photos. This method should be used instead of .setAuthUser when the user is authenticated with OAuth.

Google Picker API Link

I have tried this and I think it is not possible. Or that?

+4
source share
1 answer

This API method works (I'm currently using it). Just note that the auth token from google expires, and you may need to update the token, otherwise the google collector will return 401 when you try to get a list of files from a Google drive.

 PickerBuilder.setOAuthToken(string) 
+1
source

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


All Articles