Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: restricted_client using google drive api

I am trying to upload a file using python to google drive. I started with the quick start shown here: https://developers.google.com/drive/api/v3/quickstart/python Ive created the oAuth 2 client id and downloaded the credentials json file to my project folder. However when I try to run the code, when it opens the browser to confirm I receive the following error:

Error: restricted_client

Unregistered scope(s) in the request: https://www.googleapis.com/auth/drive
Request Details

That’s all we know.

Ive tried changing the scope from

SCOPES = 'https://www.googleapis.com/auth/drive.metadata.readonly'

to

SCOPES = 'https://www.googleapis.com/auth/drive'

however I get the same error I have also tried making a new credential and client id, still get the same error

can anyone please point out what I am doing wrong?

like image 405
Jesse RJ Avatar asked May 24 '18 10:05

Jesse RJ


People also ask

How do I fix the user rate limit exceeded on Google Drive?

Resolve a 403 error: User rate limit exceeded To fix this error, try any of the following: Raise the per-user quota in the Google Cloud project. For more information, request a quota increase.

How do I fix Google authorization error 403?

You can try to fix error 403 in Google Chrome by refreshing the page, double-checking the address, clearing the cache and cookies from your browser, confirming that you have the authorization to view the page, contacting the website directly, or returning to the page later.


1 Answers

Update: at 18:18 UTC

Seems that it was an issue on googles end and now seems to be working again. I launch my python code and a browser window opens asking me to log in. I can log in and receive the message:

The authentication flow has completed.

Hope everyone else is able to get theirs working as well

like image 169
Jesse RJ Avatar answered Oct 12 '22 23:10

Jesse RJ