I have Client ID & Client Code with me, using Gsuite application scope with OAuth 2.0 bot was able to get data from googlesheet, but problem is that once in a while browser opens up & asks for user consent.
I want to eliminate this consent thing. anyonce can help me?
There is no way to eliminate the consent screen for good.
Access to services through OAuth2 is done based on an access token that keeps getting updated without you knowing.
This is happening because when the consent screen is shown, we obtain a refresh token. No consent screen no refresh token. It is the refresh token that is used when needing a new access token.
The amount of time a refresh token lasts depends on the scopes being used, but it is anywhere between a few hours to a few days.
That being said, it is curious that you get the consent screen every single time. This should not be happening.
In the upcoming release of the GSuite package, which includes Docs functionality, we’ve worked to better manage the lifetime of stored refresh tokens, and i think you will notice a big decrease in consent screens being shown.
Still, the consent screen will be shown anytime your refresh token is expired.
@Mihai_Dunareanu Do you have a working example of using the parallel activity to accept the oauth2 screen. I have been trying to get this to work however with the parallel activity however it will not do the clicks that I have programmed
I would recommend you try using the DataStoreLocation → Orchestrator option, which stores the token response on Orchestrator. You can then have a single attended machine running an empty GSuite Application Scope and saving the token_response, and all your unattended robots using and updating that token.
It’s a much cleaner and long term viable option than creating a robot to complete the OAuth2 screen (what if google introduces captha there?).
Hi! I’m testing this orchestrator option of datalocation for token response but I keep on getting “you are not authorized!” message. I think it has something to do with the orch user role, what role settings should I tick to make this work?
I guess I am coming late to the topic, but someone might find this useful.
OAuth is not suitable for Unattended robots, use the service account instead.
The video below is describing the connection process.