Google sheets POSTing to Google Sheets - Access Token

Google sheets POSTing to Google Sheets - Access Token,google-sheets,dart,google-oauth,access-token,flutter,Google Sheets,Dart,Google Oauth,Access Token,Flutter,At the moment I have created two versions of my app - for iOS and Android - Where I use the OAuth workaround of posting to a Google Form to indirectly add to a Google Sheet. However, I am now planning to remake the app in Google's Flutter (using Dart of course), and would prefer to use the proper direct way of POSTing to the sheet (it will simplify the situation for my client), but am having trouble trying to figure out how to do it. I've found a simple explanation of how to to do the POSTing, b

At the moment I have created two versions of my app - for iOS and Android - Where I use the OAuth workaround of posting to a Google Form to indirectly add to a Google Sheet. However, I am now planning to remake the app in Google's Flutter (using Dart of course), and would prefer to use the proper direct way of POSTing to the sheet (it will simplify the situation for my client), but am having trouble trying to figure out how to do it. I've found a simple explanation of how to to do the POSTing, but it requires an

Access Token
- what appears to just be a string. After searching for an explanation of this, all I've found is explanations of how to create an OAuth token for the user using the app, but I just want to be able to post from within the app - totally separate from the user.

I guess I want a 'static' token that will just allow me to post to my sheet from my app indefinitely - is this possible, and can someone please explain it to me?


#1

It sounds like you want to use what Google calls a service account for access to a sheet that belongs to your app rather than user's account for access to a sheet that belongs to a user.

https://developers.google.com/identity/protocols/OAuth2ServiceAccount


#2

Perhaps something like github.com/dart-lang/googleapis_auth/issues/5

#3

For anyone else who ends up here while bashing your head against using a service account to update a Google sheet, here's some working code stackoverflow.com/a/54712123/7954220.