Hi Chris, i've considered the refresh token (see below) but this still requires User Interaction. We would ideally not want to use a browser to consent at all.
Is this possible?
In the meantime, I am working on a solution using the browser (in "DEVICE" mode) but it might not be feasible to use this due to the fact that we will have 50+ separate accounts to maintain (and logging onto a web browser to give consent for all of these would take forever).
I haven't got far enough into this code yet to see - i've got the user code and device code, i've consented via the website, and my code has successfully obtained the first access and refresh token. I'm hoping I can use the refresh token (when necessary) to get a new access token without ever having to give explicit (browser) consent again. Will GA OAuth2 allow me to do that i.e. consent once only via the browser and then never have to do this again (using the refresh token to get the new access token each time) - this is what i'm hoping for? If this is possible then the "once only" login might be feasible however I would still need to do this over 50 times as i'll have to consent once for each account. If there is a danger that I might have to log on again to give explicit consent, e.g. if the batch jobs haven't run for a few days and google decide I need to give explicit consent again, then I can't follow this approach.
Many thanks for your help.