승인
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
애플리케이션에서 AdMob API로 전송하는 모든 요청에는 승인 토큰이 포함되어야 합니다. Google은 이 토큰을 사용하여 애플리케이션을 식별합니다.
승인 프로토콜 정보
요청을 승인하려면 애플리케이션에서 OAuth 2.0을 사용해야 합니다. 다른 승인 프로토콜은 지원되지 않습니다. 애플리케이션에서 Google 계정으로 로그인을 사용하는 경우, 승인의 일부 절차는 자동으로 처리됩니다.
OAuth 2.0을 사용하여 요청 승인하기
AdMob API로 전송되는 모든 요청은 인증된 사용자의 승인을 받아야 합니다.
이 과정은 OAuth 클라이언트 ID를 기반으로 진행됩니다.
OAuth 클라이언트 ID 가져오기
또는 사용자 인증 정보 페이지에서 만드세요.
OAuth 2.0의 세부적인 승인 절차('흐름')는 제작 중인 애플리케이션 종류에 따라 약간씩 다릅니다. 다음의 일반적인 과정은 모든 애플리케이션 유형에 적용됩니다.
- 애플리케이션에서 사용자 데이터에 액세스해야 하는 경우 Google에 특정 액세스 범위를 요청합니다.
- Google에서 사용자에게 애플리케이션이 일부 데이터를 요청하도록 승인할 것인지 물어보는 동의 화면을 표시합니다.
- 사용자가 승인하면 Google에서 애플리케이션에 제한 시간이 있는 액세스 토큰을 제공합니다.
- 애플리케이션에서 액세스 토큰을 첨부하여 사용자 데이터를 요청합니다.
- Google에서 요청과 토큰이 유효하다고 판단하면 요청된 데이터를 반환합니다.
일부 흐름에는 새로운 액세스 토큰을 얻기 위해 갱신 토큰을 사용하는 등의 추가 단계가 포함됩니다. 다양한 유형의 애플리케이션에 적용되는 흐름을 자세히 알아보려면 Google의 OAuth 2.0 문서를 참조하세요.
다음은 AdMob API의 OAuth 2.0 범위 정보입니다.
범위 |
의미 |
https://www.googleapis.com/auth/admob.readonly |
모든 AdMob 데이터를 확인합니다. 여기에는 계정 정보,
인벤토리 및 미디에이션 설정, 보고서 및 기타 데이터가 포함될 수 있습니다.
결제나 캠페인 세부정보와 같은 민감한 정보는 포함되지 않습니다.
|
https://www.googleapis.com/auth/admob.report |
광고 실적 및 수익 보고서를 확인합니다. 게시자 ID, 시간대, 기본 통화 코드를 확인합니다.
|
OAuth 2.0을 사용하여 액세스를 요청하려면 애플리케이션에 범위 정보와 함께 애플리케이션 등록 시 Google에서 제공하는 정보(예: 클라이언트 ID, 클라이언트 보안 비밀)가 필요합니다.
팁: Google API 클라이언트 라이브러리가 사용자를 대신하여 일부 승인 과정을 처리할 수 있습니다. 이러한 라이브러리는 다양한 프로그래밍 언어로 제공됩니다. 자세한 내용은 라이브러리 및 샘플 페이지를 참조하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eEvery AdMob API request requires an authorization token for application identification and user data access.\u003c/p\u003e\n"],["\u003cp\u003eAdMob API exclusively supports OAuth 2.0 for authorization, requiring applications to obtain user consent and access tokens.\u003c/p\u003e\n"],["\u003cp\u003eApplications need an OAuth client ID and specific scopes to request access to AdMob data like account information or reports.\u003c/p\u003e\n"],["\u003cp\u003eGoogle provides client libraries to simplify the authorization process across various programming languages.\u003c/p\u003e\n"]]],["All AdMob API requests require an OAuth 2.0 authorization token, obtainable via an OAuth client ID. The application requests a specific access scope, which prompts Google to display a consent screen to the user. Upon approval, Google grants a short-lived access token. The application then uses this token to request data. Access scopes include `admob.readonly` for general data and `admob.report` for performance reports. Google APIs client libraries can help manage parts of the process.\n"],null,["# Authorization\n\nEvery request your application sends to the AdMob API must include an authorization token. The token also identifies your application to Google.\n\n#### About authorization protocols\n\nYour application must use [OAuth 2.0](https://developers.google.com/identity/protocols/OAuth2) to authorize requests. No other authorization protocols are supported. If your application uses [Sign In With Google](https://developers.google.com/identity/gsi/web), some aspects of authorization are handled for you.\n\n#### Authorizing requests with OAuth 2.0\n\nAll requests to the AdMob API must be authorized by an authenticated user.\n\nThis process is facilitated with an OAuth client ID.\nGet an OAuth client ID\n\nOr create one in the [Credentials page](https://console.cloud.google.com/apis/credentials).\n\nThe details of the authorization process, or \"flow,\" for OAuth 2.0 vary somewhat depending on what kind of application you're writing. The following general process applies to all application types:\n\n1. When your application needs access to user data, it asks Google for a particular **scope** of access.\n2. Google displays a **consent screen** to the user, asking them to authorize your application to request some of their data.\n3. If the user approves, then Google gives your application a short-lived **access token**.\n4. Your application requests user data, attaching the access token to the request.\n5. If Google determines that your request and the token are valid, it returns the requested data.\n\nSome flows include additional steps, such as using **refresh tokens** to acquire new access tokens. For detailed information about flows for various types of applications, see Google's [OAuth 2.0 documentation](https://developers.google.com/identity/protocols/OAuth2).\n\nHere's the OAuth 2.0 scope information for the AdMob API:\n\n| Scope | Meaning |\n|--------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `https://www.googleapis.com/auth/admob.readonly` | See all AdMob data. This may include account information, inventory and mediation settings, reports, and other data. This doesn't include sensitive data, such as payments or campaign details. |\n| `https://www.googleapis.com/auth/admob.report` | See ad performance and earnings reports. See publisher ID, timezone, and default currency code. |\n\nTo request access using OAuth 2.0, your application needs the scope information, as well as\ninformation that Google supplies when you register your application (such as the client ID and the\nclient secret).\n\n**Tip:** The Google APIs client libraries can handle some of the authorization process for you. They are available for a variety of programming languages; check the [page with libraries and samples](/admob/api/v1/libraries) for more details."]]