When initializing the REST Google Drive API in an Android app, I need to 'poke' the server to produce the
UserRecoverableAuthIOException
In order to minimize the network traffic, I'm searching for the most 'lightweight' request that would produce such an exception. Currently, I use the following construct:
com.google.api.services.drive.Drive svc;
svc.files().get("root").setFields("title").execute();
basically pulling the 'root' name.
Is this the lowest amount of traffic that would do the job?
The amount of traffic that is generating is negligible. It won't count as much at all.
Unless it's for academic purposes you won't achieve anything more from further optimizing for speed. There's a point where it stops being a bottleneck.
So yes that is quite likely the lightest way you can generate the UserRecoverableAuthIOException