Skip to content

Commit 8d61ce7

Browse files
committed
.
1 parent 3ce967c commit 8d61ce7

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/main.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
import json
1010
from manager_environment import EnvironmentManager as ENV
1111

12-
from google.auth.transport.requests import Request
12+
# from google.auth.transport.requests import Request
1313
from google.oauth2.credentials import Credentials
14-
from google_auth_oauthlib.flow import InstalledAppFlow
14+
# from google_auth_oauthlib.flow import InstalledAppFlow
1515
from googleapiclient import errors
1616
from 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-
7168
if __name__ == '__main__':
72-
main()
69+
main()

0 commit comments

Comments
 (0)