I need a help for refresh token in my application.
I have done an application in vb.net with Google Calendar API and "OAuth 2.0 client ID".
I gave this application to 10 teams of peoples and each team made up with three or four people. Every Team share a Calendar (set, read, change, delete events)
Credentials "ID client OAuth 2.0" for every user account was also created, without publish the appication but every people's token needs a refresh every 7 days and I don't like this.
Since I can't force all of them to pupblish the application, Is there a way to avoid this renew?
Other question: Is it possible to connect with API Key insted of "ID client OAuth 2.0" ? If so, I can do the same thing in calendar (set, read, change, delete events) ?
That's my connection:
Dim credentials As UserCredential
Dim CalendarScopes () As String = {CalendarService.Scope.Calendar, CalendarService.Scope.CalendarEvents}
Using stream As New FileStream ("C: \ Test \ credentials.json", FileMode.Open, FileAccess.Read)
credentials = GoogleWebAuthorizationBroker.AuthorizeAsync (GoogleClientSecrets.FromStream (stream) .Secrets, CalendarScopes, "user", CancellationToken.None, New FileDataStore ("C: \ Test \ token.json", True)). Result
End Using