

# Google Sheets에 대한 권한 부여 코드 OAuth 흐름 설정
<a name="googlesheets-oauth-authorization"></a>

 **사전 조건** 
+  Google Sheets 앱을 사용하기 위해 로그인할 수 있는 Google 계정. Google 계정에서 Google Sheets에는 전송하려는 데이터가 포함되어 있습니다.
+  Google Cloud Platform 관리자 계정 및 Google Cloud 프로젝트. 자세한 내용은 [Create Google Cloud Project](https://developers.google.com/workspace/guides/create-project)를 참조하세요.

**Google 계정을 설정하고 OAuth 2.0 자격 증명을 가져오는 방법:**

1.  Google Cloud 프로젝트가 설정되면 프로젝트에서 Google Sheets API 및 Google Drive API를 활성화하세요. 이를 활성화하는 단계는 Google Cloud Platform용 API Console Help의 [Enable and disable APIs](https://support.google.com/googleapi/answer/6158841)를 참조하세요.

1.  그런 다음 외부 사용자에 대한 OAuth 동의 화면을 구성하세요. OAuth 동의 화면에 대한 자세한 내용은 Google Cloud Platform Console Help의 [Setting up your OAuth consent screen](https://support.google.com/cloud/answer/10311615#)을 참조하세요.

1.  OAuth 동의 화면에서 다음 범위를 추가하세요.
   +  [ Google Sheets API 읽기 전용 범위 ](https://www.googleapis.com/auth/spreadsheets.readonly) 
   +  [ Google Drive API 읽기 전용 범위 ](ttps://www.googleapis.com/auth/drive.readonly) 

    이러한 범위에 대한 자세한 내용은 Google Identity 설명서의 [OAuth 2.0 Scopes for Google APIs](https://developers.google.com/identity/protocols/oauth2/scopes)를 참조하세요.

1.  OAuth 2.0 클라이언트 ID 및 보안 암호를 생성하세요. 이 클라이언트 ID를 생성하는 단계는 Google Cloud Platform Console Help의 [Setting up OAuth 2.0](https://support.google.com/cloud/answer/6158849?hl=en#zippy=)을 참조하세요.

    OAuth 2.0 클라이언트 ID에는 하나 이상의 승인된 리디렉션 URL이 포함되어야 합니다.

    리디렉션 URL 형식은 다음과 같습니다.
   + https://<aws-region>.console.aws.amazon.com/gluestudio/oauth 

1.  OAuth 2.0 클라이언트 ID의 설정에서 클라이언트 ID 및 클라이언트 보안 암호를 기록하세요.