앱이 사용자를 대신하여 웹 서비스와 상호작용할 수 있도록 모든 Google AdMob API 호출은 OAuth2를 통해 승인되어야 합니다. OAuth2를 사용하면 AdMob API 클라이언트 앱이 사용자의 사용자 이름이나 비밀번호를 처리하거나 저장하지 않고도 사용자의 AdMob 계정에 액세스할 수 있습니다. 승인에 관한 개요는 승인을 참고하세요.
애플리케이션 유형으로 데스크톱 앱 또는 웹 애플리케이션을 선택하고 이름을 지정한 다음 만들기를 클릭합니다.
완료되면 OAuth 2.0 클라이언트 ID와 클라이언트 보안 비밀번호가 표시됩니다. 이 정보를 JSON 형식으로 다운로드하여 나중에 사용할 수 있도록 저장할 수 있습니다.
요청하기
AdMob API는 HTTP 및 JSON에 기반하므로 모든 표준 HTTP 클라이언트가 여기에 요청을 보내고 응답을 파싱할 수 있습니다. 그러나 Google API 클라이언트 라이브러리는 더 나은 언어 통합, 향상된 보안, 승인된 요청을 위한 지원을 제공합니다. 이 클라이언트 라이브러리는 다양한 프로그래밍 언어로 제공되므로 HTTP 요청을 직접 설정하고 응답을 파싱하지 않아도 됩니다.
OAuth 2.0 사용자 인증 정보가 생성되면 AdMob API를 사용할 준비가 됩니다. OAuth 2.0을 사용하여 액세스를 요청하려면 앱에 범위 정보도 필요합니다.
범위
의미
https://www.googleapis.com/auth/admob.readonly
모든 AdMob 데이터를 확인합니다. 여기에는 계정 정보, 인벤토리 및 미디에이션 설정, 보고서 및 기타 데이터가 포함될 수 있습니다.
결제나 캠페인 세부정보와 같은 민감한 정보는 포함되지 않습니다.
https://www.googleapis.com/auth/admob.report
광고 실적 및 수익 보고서를 확인합니다. 게시자 ID, 시간대, 기본 통화 코드를 확인합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-05-08(UTC)"],[[["All Google AdMob API calls require OAuth2 authorization for your app to access user data securely without storing sensitive login credentials."],["Choose between desktop or web app authentication flow based on your app's needs and authorization process."],["Create or select a Google API project and enable the AdMob API before generating OAuth2 credentials."],["Make authorized requests to the AdMob API using HTTP clients or client libraries in various programming languages."],["Revoke access tokens through your Google account permissions or the Google Identity API when necessary."]]],["To use the Google AdMob API, authorize calls via OAuth2. First, create or select a project in the Google API Console and enable the AdMob API. Next, create OAuth2 credentials, choosing between \"Desktop app\" or \"Web app\" authentication types based on your needs. Configure the OAuth consent screen, download the generated client ID and secret, and then use these credentials to authorize requests with specified scopes, such as `admob.monetization` or `admob.readonly`. To start making requests, you can utilize the Google API client libraries. If you want to revoke access, you can do so from your Google account or using Google Identity API.\n"]]