youngtsai commited on
Commit
fda35a7
1 Parent(s): 8131da7

from_service_account_info

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -19,7 +19,7 @@ from googleapiclient.discovery import build
19
  credentials_json_string = os.getenv("GOOGLE_APPLICATION_CREDENTIALS_JSON")
20
  credentials_dict = json.loads(credentials_json_string)
21
  SCOPES = ['https://www.googleapis.com/auth/drive']
22
- credentials = service_account.Credentials.from_service_account_file(
23
  credentials_dict, scopes=SCOPES)
24
  service = build('drive', 'v3', credentials=credentials)
25
  # 列出 Google Drive 上的前10個文件
 
19
  credentials_json_string = os.getenv("GOOGLE_APPLICATION_CREDENTIALS_JSON")
20
  credentials_dict = json.loads(credentials_json_string)
21
  SCOPES = ['https://www.googleapis.com/auth/drive']
22
+ credentials = service_account.Credentials.from_service_account_info(
23
  credentials_dict, scopes=SCOPES)
24
  service = build('drive', 'v3', credentials=credentials)
25
  # 列出 Google Drive 上的前10個文件