API Key for google sheets using gsuite application scope

Hi all!

I have been reading on the forum but I have not been able to solve my problem.

I created a google API and I am using it with a read range google sheet activity but i get the following error.

Read Range: The caller does not have permission [403]

I have checked and the account I am using does have access to the spreadsheet, before I used to use a Oauth on this process and it worked but now I wanted to use an API Key since I have to make many gets and the Oauth was timing out after a couple requests.

thanks in advance!

@Procesos_Operaciones

Welcome to forums

Enable all the ticks you are getting in scope
Also, If you are passing variable to API Key check whether you are getting value correctly
Check with the GSuite administrator that you have all the required permission for the scope

If everything was correct, sometimes it will take time once the modification is done in Gsuite, so wait for a while and check again

Thanks,
Srini

@Procesos_Operaciones

welcome to the community

The “caller does not have permission [403]” error in UiPath Google API usually means that the account or credentials used to access the API do not have the necessary permissions to perform the requested action.

To resolve this error, you can try the following:

  1. Make sure that you have created a valid Google API key and authorized it to access the required Google API services.

  2. Verify that the Google API key you are using has the required permissions to access the specific Google API services you need. You may need to check the API console and ensure that you have enabled the appropriate APIs.

  3. Check if the Google API key has any IP address restrictions that could be preventing access from the UiPath server. If this is the case, you may need to add the IP address of the UiPath server to the API key’s allowed IP list.

  4. Ensure that the UiPath robot or user account you are using has the necessary permissions to access the Google API services. This could include permissions to read, write, or modify data in the specific Google API service.

  5. Check if there are any rate limits or quotas set on the Google API services you are trying to access. If you exceed these limits, you may receive a 403 error. You can try reducing the number of requests or increasing the quota limits to resolve this issue.

If none of the above solutions work, you may need to contact the Google Cloud Support team for further assistance in resolving the issue.

Thank you for the answer! I did what you said and checked and it was enabled.

The account I am using is the same account that created the API Key and also its the owner of the spreadsheet I am trying to access.

I tried different “configure scopes” configurations but no success yet.

I don’t think its the limit since it is not allowing to access the first spreadsheet.

Once again thanks in advance

@Procesos_Operaciones

Please try with read only scope as apikey i guess works with only readonly and also the spreadsheets should be public

Cheers