https://developers.google.com/drive/api/v3/folder中提到的代码适用于“我的云端硬盘”。没有运气使用:
file_metadata = {
'supportsAllDrives':True,
'driveId': '0AGRl',
'name': "new folderrrrr",
'mimeType': 'application/vnd.google-apps.folder',
}
file = DRIVE.files().create(body=file_metadata,
fields='id', supportsAllDrives=True, supportsTeamDrives=True).execute()```
替换
'driveId': '0AGRl'
通过
"parents": ["0AGRl"]