이 파일럿은 고객이 Display & Video 360 API를 사용하여 구조화된 데이터 파일 (SDF)을 업로드할 수 있도록 하는 새로운 Display & Video 360 API 베타 기능을 테스트할 수 있는 방법을 제공합니다.
이 파일럿을 사용하면 등록된 각 Google Cloud 프로젝트에서 광고주당 하루에 최대 30개의 SDF를 업로드할 수 있습니다. 각 파일에는 최대 10,000개의 항목이 포함될 수 있습니다.
파일럿 기능을 사용하는 방법에 관한 안내는 SDF 업로드 가이드를 참조하세요.
시작하기
Display & Video 360 API를 시작한 후 파일럿 기능을 사용하려면 다음 단계를 완료하세요.
파일럿에 Google Cloud 프로젝트 등록
파일럿에 대한 액세스를 요청하고 부여받은 고객만 파일럿 기능을 사용할 수 있습니다.
API 키 생성
표준 Display & Video 360 API 사용자 인증 정보 외에도 API 키를 사용해야 합니다. API 키를 생성하여 클라이언트 구성에서 사용할 Google Cloud 프로젝트 에 사용합니다.
클라이언트 구성
Python용 Google API 클라이언트 라이브러리를 사용하여 이러한 파일럿 기능에 액세스합니다.
파일럿 기능에 요청을 보내도록 클라이언트 라이브러리를 설치하고 구성하는 방법은 다음과 같습니다.
Python
google-api-python-client 설치
pip install --upgrade google-api-python-client
필요한 라이브러리 가져오기
from google_auth_oauthlib.flow import InstalledAppFlow from googleapiclient import discovery
클라이언트 보안 정보 파일을 로드하고 승인 사용자 인증 정보 생성
# Set up a flow object to create the credentials using the # client secrets file and OAuth scopes. credentials = InstalledAppFlow.from_client_secrets_file( path-to-client-secrets-file, oauth-scopes).run_local_server()
검색 서비스를 사용하여 승인된 서비스 객체 만들기
api_key = "API_KEY" api_name = "displayvideo" api_url = f"https://{api_name}.googleapis.com" api_version = "v4" api_label = "SDF_UPLOAD_ALPHA" discovery_url = ( f"{api_url}/$discovery/rest?key={api_key}&version={api_version}&labels={api_label}" ) service = discovery.build(api_name, api_version, discoveryServiceUrl=discovery_url, credentials=credentials)