How do I import a google sheets file that is in my google drive?

I tried the following:

Import["https://docs.google.com/spreadsheets/d/...file...id...",Authentication-><|"Username"->"[email protected]","Password"->"..."|>]

When I try this I get the following output:

One account. All of Google. Sign in to continue to Sheets

Enter your email Find my account Sign in with a different account Create account One Google Account for everything Google

About Google Privacy Terms Help

I am signed into my google account in my browser.

  • $\begingroup$ Not to avoid the main issue you want to solve, but why not make the file publicly available via a shared link that does not require authentication? $\endgroup$ Mar 21, 2021 at 6:59
  • $\begingroup$ @CATrevillian It's a business account with internal files and I am not allowed to make the files public. $\endgroup$
    – user13892
    Mar 21, 2021 at 7:02
  • 1
    $\begingroup$ Google uses OAuth, SecuredAuthenticationKey is probably the most relevant Mathematica thing to look at. Maybe see developers.google.com/sheets/api. Also mathematica.stackexchange.com/questions/200506/…. $\endgroup$
    – Adam
    Mar 21, 2021 at 8:53
  • $\begingroup$ @Adam does SecuredAuthenticationKey support OAuth 2.0? There is no example showing it and no option parameter to use OAuth 2.0 in the documentation. $\endgroup$
    – user13892
    Mar 22, 2021 at 8:40

1 Answer 1


I had a similar problem trying to open a google sheet file shared with me. By selecting "SHARE" in google Drive and share the file for "Anyone with the link." Then Import["https://docs.google.com/spreadsheets/d/.../export?format=csv","Data"];

I hope that this helps.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.