Google Drive API Client (Python): Insufficient Permission for files().insert()

后端 未结 3 765
無奈伤痛
無奈伤痛 2020-12-10 03:57

I am trying to get a simple Python Google Drive uploader working. I\'ve created a project in the developer console, enabled the Drive API and added an OAuth 2.0 client ID (a

相关标签:
3条回答
  • 2020-12-10 04:05

    Files: insert requires authorization with at least one of the following scopes

    https://www.googleapis.com/auth/drive
    https://www.googleapis.com/auth/drive.file
    https://www.googleapis.com/auth/drive.appdata
    https://www.googleapis.com/auth/drive.apps.readonly

    Check which scope you are authenticating with.

    0 讨论(0)
  • 2020-12-10 04:16

    If modifying these scopes or permissions, try deleting your previously saved credentials related file or browser cache if any.

    0 讨论(0)
  • 2020-12-10 04:17

    As advised by @DalmTo, the issue was an incorrect Auth scope in:

     flow_from_clientsecrets()
    
    0 讨论(0)
提交回复
热议问题