Also, cheers to you for giving more details in your post when asking a question!
(Please delete the previous post to avoid separate threads to fix the same issue)
Thanks for the help. I have checked the local panel, here is the error coming,
RemoteException wrapping System.AggregateException: One or more errors occurred. —> RemoteException wrapping Google.Apis.Auth.OAuth2.Responses.TokenResponseException: Error:“access_denied”,
Description:“”,
Uri:“”
at Google.Apis.Auth.OAuth2.AuthorizationCodeInstalledApp.d__8.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Google.Apis.Auth.OAuth2.GoogleWebAuthorizationBroker.d__4.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Google.Apis.Auth.OAuth2.GoogleWebAuthorizationBroker.d__1.MoveNext()
— End of inner exception stack trace —
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task1.get_Result()
at Gmail.Activities.GoogleAuthentication.AuthenticateOauth2(String ClientId,
String ClientSecret)
at UiPathTeam.Gmail.Activities.GoogleAuthenticationScope.Execute(NativeActivityContext context)
at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance,
ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor,
BookmarkManager bookmarkManager,
Location resultLocation)
Typically, the reason for an exception will be apparent in the first couple of lines.
In this case, it shows the reason as “access_denied” which means your authentication isn’t working properly.
This could be either because your user credentials are wrong or there may be some settings not configured from the Gmail API which is supposed to respond to the request.
Thank you for the explanation, I am also thinking same, my Gmail settings are not proper I guess. It would be great if I would find any sample article for the same explaining the procesdure to do so, that might help, I am searching, if anyone can find please help me with that. Thank you.
Thank you for the all supports, I have solved the issue, It was really Gmail API permission process, in which I was missing one small step. Now I can access the Gmail scope.