7
votes

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?

2
Me too! Few hours ago started this tutorial. It does not work. However Google Plus API does with the same client.Karolis Milieška
I think this is something on Google's side since everything was working perfectly up until a couple of hours ago. Not sure what is causing it though.Dr. GIT
Same for me, my offline app was working yesterday and now I get the same error!Jean-Michel Provencher
Here's a link to an older, duplicate question: stackoverflow.com/questions/50501811/…. I tried editing the post with code to show the problem but it hasn't been approved.kanso

2 Answers

1
votes

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

0
votes

This issue seem to be at Google's end . I faced similar issue with java SDK and many others have reported same issue today only while using YouTube API.