We passed the verification to start using
calendar.events.readonlyscope on breess.com service.We created the service account with wide delegation
In G Suite domain’s admin console added scope https://www.googleapis.com/auth/calendar.events.readonly
The user account
[email protected]granted access to his calendar
Everything looks configured. The code below is executed on the host and returns the error:
Error:"unauthorized_client", Description:"Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested.", Uri:""
Have we missed something? Could you please guide us to resolve the issue?
Extra note:
var credential = GoogleCredential
.FromFile("breess-7798c393d5b0.json")
.CreateScoped(new[] { CalendarService.Scope.CalendarEventsReadonly })
.createwithuser("[email protected]");
var calendarService = new CalendarService(new BaseClientService.Initializer { HttpClientInitializer = credential, ApplicationName = "BREESS" });
var request = calendarService.Events.List(calendarId);
var events = await request.ExecuteAsync();
client idfrom the credentials correspond with theunique idfrom the service account? - ale13