채팅 7875532826 / 메시지 1473
텍스트 메시지
대화방 Snoopybot
발신자 Lee Haksung (@leehsong)
발신 시각 2026-02-18T01:45:51+00:00
메시지
from google_auth_oauthlib.flow import InstalledAppFlow
path = '/Users/leehsong/Downloads/client_secret_xxx.json' # 파일명 바꿔주세요
cfg = json.load(open(path,'r',encoding='utf-8'))
flow = InstalledAppFlow.from_client_config(cfg, ['https://www.googleapis.com/auth/calendar'])
creds = flow.run_local_server(port=0, open_browser=True)
print('REFRESH_TOKEN=', creds.refresh_token)
print('CLIENT_ID=', cfg['installed']['client_id'])
print('CLIENT_SECRET=', cfg['installed']['client_secret'])
print('PROJECT_ID=', cfg['installed'].get('project_id'))
PY
/Users/leehsong/Library/Python/3.9/lib/python/site-packages/google/auth/__init__.py:54: FutureWarning: You are using a Python version 3.9 past its end of life. Google will update google-auth with critical bug fixes on a best-effort basis, but not with any other fixes or features. Please upgrade your Python version, and then update google-auth.
warnings.warn(eol_message.format("3.9"), FutureWarning)
/Users/leehsong/Library/Python/3.9/lib/python/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
warnings.warn(
/Users/leehsong/Library/Python/3.9/lib/python/site-packages/google/oauth2/__init__.py:40: FutureWarning: You are using a Python version 3.9 past its end of life. Google will update google-auth with critical bug fixes on a best-effort basis, but not with any other fixes or features. Please upgrade your Python version, and then update google-auth.
warnings.warn(eol_message.format("3.9"), FutureWarning)
Traceback (most recent call last):
File "<stdin>", line 5, in <module>
FileNotFoundError: [Errno 2] No such file or