So I have an android app that must interface with a google sheet (both reading and writing data). The Java quickstart guide: google sheet quick start for java has been a good resource but I'd like to do this with firebase if at all possible because that's what the iOS version of this app uses. Is it possible to get the proper credentials from firebase to interface with google sheets in this way? Thanks!!
Asked
Active
Viewed 89 times
1
-
Are you using Google workspace domain account or is the sheet in question on a standard google account? – Linda Lawton - DaImTo Jan 02 '23 at 05:57
-
Note the tutorial you are following is for an installed application not a mobile app. It will also request consent of the user to access a sheet on their own account. if this is a static sheet used internally by your application you should consider using a service account. in either case this is not the example you are looking for. – Linda Lawton - DaImTo Jan 02 '23 at 06:03
-
@DaImTo, I am using a sheet from a standard google account. – Jan 02 '23 at 14:38
1 Answers
0
Users in Firebase Authentication are identified by an ID token, which is not a valid sign-in mechanism for Google Sheets (and other parts of Google docs) - which requires an OAuth based sign-in token.
The only variant that could work is if you sign in to Firebase with a Google account, and capture the OAuth token for that Google account and use it to access Google Sheets.
Also see:

Frank van Puffelen
- 565,676
- 79
- 828
- 807
-
That is the method of sign in that is being used by the app. How can I capture the oauth token and use it to access google sheets? – Jan 02 '23 at 01:24
-
Where does the author state they are using workspace? All they mention this is a google sheet. I would think you answer should be directed to a standard google account rather than confusing them by introducing workspace into the mix. Especially considering the quick start they following is for an installed app and not a service account with deligation – Linda Lawton - DaImTo Jan 02 '23 at 05:55
-
Google Sheets is part of Workspace, isn't it? I thought Google docs wasn't the correct name anymore, but I'll gladly use that if that's less confusing. – Frank van Puffelen Jan 02 '23 at 15:05