The caller does not have permission [403] Error

Hi
My first project, tried to read from Google Sheet, then type into a website.
Followed instruction to add Api Key for GSuite Application Scope as screenshot


But always got the error, any suggestion where I should look into…Thanks

19.6.0+Branch.master.Sha.adf20656f41da84cdec5e5620b62276717eb7319

Source: Read Range

Message: Google.Apis.Requests.RequestError
The caller does not have permission [403]
Errors [
Message[The caller does not have permission] Location[ - ] Reason[forbidden] Domain[global]
]

Exception Type: Google.GoogleApiException

RemoteException wrapping Google.GoogleApiException: Google.Apis.Requests.RequestError
The caller does not have permission [403]
Errors [
Message[The caller does not have permission] Location[ - ] Reason[forbidden] Domain[global]
]

at Google.Apis.Requests.ClientServiceRequest1.<ParseResponse>d__31.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.Requests.ClientServiceRequest1.d__27.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 UiPath.GSuite.Activities.API.SheetsExtensions.d__0.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 UiPath.GSuite.Activities.ReadRange.d__22.MoveNext()
— End of stack trace from previous location where exception was thrown —
at UiPath.GSuite.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at UiPath.GSuite.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Looks like generated API key does not have rights assigned to it in google cloud console. have a look first there.

Hi Alex,

Thanks for your hint, but not sure what you mean. Api Key is quite straight forward, and I had set both Application and API restrictions to none.

Is there any instruction to look into for setting of Api Key and OAuth client ID besides this…

My question, for example, what is the application type while creating OAuth client ID?

@MubieSam_Lin
Here’s a Stack Overflow thread that discusses some potential fixes to this problem, it may be useful.

@MubieSam_Lin API keys is an old fashion to Authenticate client in compare to OAuth. It is just a string which is matched to stored list on google server.

OAuth is a conversation between Browser and server. As I know, google uses REST api. REST stands for REpresentational State Transfer , which probably doesn’t help you that much in understanding what it is. Pragmatically, it means that you or your program communicates with a remotely-run service using standard web commands and protocols such as HTTP requests and responses. You send the service an API command wrapped in an HTTP request, and it responds with a success or failure indicator and any results data, all wrapped in an HTTP response.
So I am not aware about any extra information in regards to OAuth in UiPath Universe,

Also I’d like to notice that Google limiting applications/services where you can use just API Key to get access to services. Check that Gsuite among them. Everything is changing quite quickly. Does Gsuite allow to use API Keys ?

1 Like

@alex.glebov @DanielMitchell

Thanks for the hint, change the permission of the Google sheet to public seems solve the 403 error, but it got 400 error for unable to parse range, any suggestion?

Not off the top of my head, no.

A quick google search brings up the following links, perhaps one of them may be of help?

2 Likes

@DanielMitchell Thanks for the headup, my apology for not doing the search enough.
The problem is that my SheetName is in Chinese, which will be different from “Sheet1” in UiPath.

@MubieSam_Lin
You should be able to just change the sheet name in UiPath to match whatever your sheet name is, no matter the language.

Sorry I did not express properly, I mean the problem for SheetName was found and solved.

But another issue is that how to deal with Google reCAPTCHA while trying to login my wordpress site? or should I create another topic?

Thanks

@MubieSam_Lin
Yes, go ahead and make a new post if it’s a new issue.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.