Google Drive Picker returns 401 with drive.file scope but works with drive.readonly
03:42 09 May 2026

I’m integrating Google Drive Picker in an Electron app using @googleworkspace/drive-picker-element.

My OAuth flow works correctly:

  1. Open OAuth URL:

    https://accounts.google.com/o/oauth2/v2/auth
    
    • response_type=code

    • access_type=offline

    • prompt=consent

  2. Redirect to localhost and receive authorization code

  3. Exchange code for token via:
    https://oauth2.googleapis.com/token

I can successfully get:

  • access_token

  • refresh_token

  • id_token

and the access token works with Drive API:

GET https://www.googleapis.com/drive/v3/files

returns data successfully.

Problem

When I use the token with Drive Picker:


  

the picker internally opens:

https://docs.google.com/picker?...

and this request returns 401.

Important observation

If I request OAuth with:

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

Picker works correctly.

But if I request OAuth with:

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

Picker consistently returns 401.

This is confusing because Google documentation suggests Picker supports drive.file, and products like Notion also appear to use drive.file.

Already checked

  • access token is valid

  • Drive API works with same token

  • OAuth code flow works

  • client_id, app_id, and API key are from same Google Cloud project

  • Google Drive API enabled

  • Google Picker API enabled

  • Authorized JavaScript origins configured correctly

  • developer-key provided

  • login-hint tested (email and sub)

  • same issue in logged-in and logged-out browser states

Additional scopes tested:

  • openid

  • userinfo.email

  • userinfo.profile

No change.

Question

Does Google Drive Picker currently support drive.file with drive-picker-docs-view / "all" view?

Are there additional requirements or limitations when using drive.file with Picker?

Is drive.readonly effectively required for browsing files in Picker?

Any clarification would be appreciated.

Thanks.

javascript google-picker google-drive-picker