# Google Calendar OAuth 앱 등록 가이드

## 1. Cloud Console 접속

1. https://console.cloud.google.com 접속
2. 사용할 프로젝트 선택 (없으면 '새 프로젝트' 생성)
3. 좌측 메뉴 → 'APIs & Services'

## 2. Google Calendar API 활성화

- 'APIs & Services' → 'Library' → "Google Calendar API" 검색 → **Enable** 클릭
- 활성화 후 'Enabled APIs' 목록에 표시되는지 확인

## 3. OAuth 동의 화면 설정

- 'APIs & Services' → 'OAuth consent screen'
- **User Type**: 사내 계정만 사용하면 Internal, 외부 계정도 지원하면 External
- 앱 이름 · 지원 이메일 · 로고 등록
- **Testing** 모드로 시작 (외부 발행 시 Google 심사 필요)

## 4. OAuth Client ID 발급

- 'APIs & Services' → 'Credentials' → 'Create Credentials' → **OAuth client ID**
- **Application type**: Web application
- **Authorized redirect URIs**: `https://mcp-hub.wrks.ai/oauth/callback` 추가

## 5. Scope 등록

동의 화면 'Scopes' 섹션에서 필요한 scope 추가:

- `https://www.googleapis.com/auth/calendar` — 캘린더 전체 접근
- `https://www.googleapis.com/auth/calendar.events` — 이벤트 조회 · 생성 · 수정

## 6. 자격 정보 발급

- 생성 완료 후 **Client ID** · **Client Secret** 확인 (JSON 다운로드 가능)
- Studio → Toolkits → New → 'Google Calendar' 템플릿 선택
- OAuth 설정 화면에 Client ID · Client Secret 입력

## 참고

- Scope 목록: https://developers.google.com/identity/protocols/oauth2/scopes#calendar
- 주의: Gmail · Drive 처럼 Restricted Scope 를 사용하는 경우 **CASA (Cloud Application Security Assessment)** 별도 심사가 필요함. Calendar 는 Sensitive Scope 라 심사 자체는 상대적으로 간단하나 브랜드 검증 필요.
