我正在尝试使用 google drive api。我创建了一个服务帐户凭据并从控制台云下载。问题是我是 gsuit 组织的一部分,当我尝试列出我的文件时,它是空的,但我的驱动器中有文件。
from apiclient.discovery import build
from oauth2client.service_account import ServiceAccountCredentials
credentials = ServiceAccountCredentials.from_json_keyfile_name(
"credentials.json", scopes=['https://www.googleapis.com/auth/drive'])
service = build('drive', 'v3', credentials=credentials)
print(service.files().list().execute())
可能是什么?