이 페이지에서는 API 키를 사용하여 API 키를 허용하는 Trusted Cloud by S3NS API 및 서비스에 액세스하는 방법을 설명합니다.
일부 Trusted Cloud by S3NS API는 사용을 승인하기 위해 API 키를 허용하지 않습니다. 사용하려는 서비스나 API에 대한 문서를 검토하여 API 키 허용 여부를 확인합니다.
API 키 제한을 포함하여 API 키를 만들고 관리하는 방법에 대한 자세한 내용은 API 키 관리를 참조하세요.
시작하기 전에
Select the tab for how you plan to use the samples on this page:
C#
로컬 개발 환경에서 이 페이지의 .NET 샘플을 사용하려면 gcloud CLI를 설치하고 초기화한 후 사용자 인증 정보로 애플리케이션 기본 사용자 인증 정보를 설정합니다.
-
Install the Google Cloud CLI.
-
Configure the gcloud CLI to use your federated identity.
For more information, see Sign in to the gcloud CLI with your federated identity.
-
Create local authentication credentials for your user account:
gcloud auth application-default login
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
자세한 내용은 Trusted Cloud 인증 문서의 로컬 개발 환경의 ADC 설정을 참조하세요.
C++
로컬 개발 환경에서 이 페이지의 C++ 샘플을 사용하려면 gcloud CLI를 설치하고 초기화한 후 사용자 인증 정보로 애플리케이션 기본 사용자 인증 정보를 설정합니다.
-
Install the Google Cloud CLI.
-
Configure the gcloud CLI to use your federated identity.
For more information, see Sign in to the gcloud CLI with your federated identity.
-
Create local authentication credentials for your user account:
gcloud auth application-default login
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
자세한 내용은 Trusted Cloud 인증 문서의 로컬 개발 환경의 ADC 설정을 참조하세요.
Go
로컬 개발 환경에서 이 페이지의 Go 샘플을 사용하려면 gcloud CLI를 설치하고 초기화한 후 사용자 인증 정보로 애플리케이션 기본 사용자 인증 정보를 설정합니다.
-
Install the Google Cloud CLI.
-
Configure the gcloud CLI to use your federated identity.
For more information, see Sign in to the gcloud CLI with your federated identity.
-
Create local authentication credentials for your user account:
gcloud auth application-default login
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
자세한 내용은 Trusted Cloud 인증 문서의 로컬 개발 환경의 ADC 설정을 참조하세요.
Node.js
로컬 개발 환경에서 이 페이지의 Node.js 샘플을 사용하려면 gcloud CLI를 설치하고 초기화한 후 사용자 인증 정보로 애플리케이션 기본 사용자 인증 정보를 설정합니다.
-
Install the Google Cloud CLI.
-
Configure the gcloud CLI to use your federated identity.
For more information, see Sign in to the gcloud CLI with your federated identity.
-
Create local authentication credentials for your user account:
gcloud auth application-default login
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
자세한 내용은 Trusted Cloud 인증 문서의 로컬 개발 환경의 ADC 설정을 참조하세요.
Python
로컬 개발 환경에서 이 페이지의 Python 샘플을 사용하려면 gcloud CLI를 설치하고 초기화한 후 사용자 인증 정보로 애플리케이션 기본 사용자 인증 정보를 설정합니다.
-
Install the Google Cloud CLI.
-
Configure the gcloud CLI to use your federated identity.
For more information, see Sign in to the gcloud CLI with your federated identity.
-
Create local authentication credentials for your user account:
gcloud auth application-default login
If an authentication error is returned, and you are using an external identity provider (IdP), confirm that you have signed in to the gcloud CLI with your federated identity.
자세한 내용은 Trusted Cloud 인증 문서의 로컬 개발 환경의 ADC 설정을 참조하세요.
REST
로컬 개발 환경에서 이 페이지의 REST API 샘플을 사용하려면 gcloud CLI에 제공한 사용자 인증 정보를 사용합니다.
Install the Google Cloud CLI, and then sign in to the gcloud CLI with your federated identity.
자세한 내용은 Trusted Cloud 인증 문서의 REST 사용을 위한 인증을 참조하세요.
REST에 API 키 사용
REST API 호출에 API 키를 포함하려면 x-goog-api-key
HTML 헤더를 사용합니다.
HTTP 헤더를 사용할 수 없는 경우 key
쿼리 파라미터를 사용할 수 있습니다.
그러나 이 메서드는 URL에 API 키를 포함하므로 URL 스캔에 키가 노출될 위험이 있습니다.
클라이언트 라이브러리에 API 키 사용
애플리케이션에서 API 키를 사용하는 경우 저장 및 전송 중에 안전하게 보호되도록 해야 합니다. API 키를 공개적으로 노출하면 계정에 예상치 않은 비용이 부과될 수 있습니다. 자세한 내용은 API 키 관리 권장사항을 참조하세요.
다음 단계
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-18(UTC)