File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 99import json
1010from manager_environment import EnvironmentManager as ENV
1111
12- from google .auth .transport .requests import Request
12+ # from google.auth.transport.requests import Request
1313from google .oauth2 .credentials import Credentials
14- from google_auth_oauthlib .flow import InstalledAppFlow
14+ # from google_auth_oauthlib.flow import InstalledAppFlow
1515from googleapiclient import errors
1616from googleapiclient .discovery import build
1717
@@ -39,11 +39,9 @@ def main():
3939 "https://www.googleapis.com/auth/script.projects"
4040 ],
4141 }
42- creds = Credentials .from_authorized_user_file ('token.json' , SCOPES )
43-
42+ creds = Credentials .from_authorized_user_info (token , SCOPES )
4443 try :
4544 service = build ('script' , 'v1' , credentials = creds )
46-
4745 # Call the Apps Script API
4846 # Upload two files to the project
4947 request = {
@@ -67,6 +65,5 @@ def main():
6765 # The API encountered a problem.
6866 print (error .content )
6967
70-
7168if __name__ == '__main__' :
72- main ()
69+ main ()
You can’t perform that action at this time.
0 commit comments