Adapters
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
AdMob API에는 프로그래매틱 방식으로 미디에이션 어댑터를 나열하는 기능이 있습니다. 자세한 내용은 accounts.adSources.adapters.list
를 참고하세요. 어댑터에는 서드 파티 어댑터 구성에 관한 세부정보가 포함됩니다.
예시
OAuth 2.0 사용자 인증 정보가 생성되면 AdMob API를 사용할 준비가 됩니다. OAuth 2.0을 사용하여 액세스를 요청하려면 애플리케이션에 범위 정보도 필요합니다.
다음은 OAuth 2.0 범위 정보입니다.
범위 |
의미 |
https://www.googleapis.com/auth/admob.monetization |
AdMob 수익 창출 설정을 확인, 생성, 수정합니다.
|
https://www.googleapis.com/auth/admob.readonly |
모든 AdMob 데이터를 확인합니다. 여기에는 계정 정보, 인벤토리 및 미디에이션 설정, 보고서 및 기타 데이터가 포함될 수 있습니다.
결제나 캠페인 세부정보와 같은 민감한 정보는 포함되지 않습니다.
|
curl (명령줄)
curl을 사용한 요청
클라이언트 보안 비밀번호 파일을 로드하고 승인 사용자 인증 정보를 생성합니다.
이 단계를 처음 수행하면 브라우저에서 승인 메시지를 수락하라는 메시지가 표시됩니다. 수락하기 전에 AdMob API에 액세스할 수 있는 Google 계정으로 로그인했는지 확인하세요. 앱은 현재 로그인되어 있는 계정을 대신하여 데이터에 액세스할 수 있는 권한을 부여받습니다.
인증 및 승인에는 Google OAuth 2.0을 사용하는 간단한 명령줄 도구인 oauth2l을 사용하는 것이 좋습니다. oauth2l을 설치하고 아래 명령어를 실행합니다. 이때 path_to_credentials_json를 클라우드 애플리케이션을 등록할 때 다운로드하는 credentials.json
파일의 경로로 바꿉니다. 처음 실행 시 명령어를 통해 OAuth 2.0 승인 절차가 진행됩니다. 이후 실행에서는 토큰이 자동으로 갱신됩니다.
oauth2l header --json path_to_credentials_json --scope admob.readonly
어댑터를 나열합니다.
pub-XXXXXXXXXXXXXXXX를 게시자 ID로 대체하여 AdMob 어댑터 정보를 가져옵니다. 게시자 ID를 찾는 방법을 참고하세요.
SSSSSSSSSSSSSSSSSSSS를 관심 있는 어댑터의 광고 소스 ID로 바꿉니다.
다음 명령어를 사용하여 어댑터 목록을 가져옵니다.
curl --http1.0 -X GET https://admob.googleapis.com/v1beta/accounts/pub-XXXXXXXXXXXXXXXX/adSources/SSSSSSSSSSSSSSSSSSSS/adapters \
-H "$(oauth2l header --json path_to_credentials_json --scope admob.readonly)"
ID가 5450213213286189855
인 AdMob 네트워크 광고 소스의 샘플 응답:
{
"adapters": [
{
"name": "accounts/pub-XXXXXXXXXXXXXXXX/adSources/5450213213286189855/adapters/1",
"adapterId": "1",
"title": "AdMob Network Android SDK",
"platform": "ANDROID",
"formats": ["BANNER", "INTERSTITIAL",
"REWARDED", "NATIVE", "REWARDED_INTERSTITIAL", "APP_OPEN"],
"adapterConfigMetadata": [{
"adapterConfigMetadataId": "118",
"adapterConfigMetadataLabel": "Ad unit ID"
}]
},
{
"name": "accounts/pub-XXXXXXXXXXXXXXXX/adSources/5450213213286189855/adapters/2",
"adapterId": "2",
"title": "AdMob Network iOS SDK",
"platform": "ANDROID",
"formats": ["BANNER", "INTERSTITIAL",
"REWARDED", "NATIVE", "REWARDED_INTERSTITIAL", "APP_OPEN"],
"adapterConfigMetadata": [{
"adapterConfigMetadataId": "119",
"adapterConfigMetadataLabel": "Ad unit ID"
}]
}]
}
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-31(UTC)
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eThe AdMob API allows programmatic listing of mediation adapters, including details on third-party configurations.\u003c/p\u003e\n"],["\u003cp\u003eTo use the AdMob API, OAuth 2.0 credentials with appropriate scope information (\u003ccode\u003eadmob.monetization\u003c/code\u003e or \u003ccode\u003eadmob.readonly\u003c/code\u003e) are required.\u003c/p\u003e\n"],["\u003cp\u003eYou can utilize \u003ccode\u003ecurl\u003c/code\u003e with OAuth 2.0 authentication to retrieve a list of adapters for a specific AdMob ad source.\u003c/p\u003e\n"],["\u003cp\u003eThe response provides details like adapter name, ID, platform, supported ad formats, and configuration metadata.\u003c/p\u003e\n"]]],["The AdMob API allows programmatic listing of mediation adapters, including third-party configurations. Access requires OAuth 2.0 credentials and specific scopes like `admob.monetization` or `admob.readonly`. To use it with curl, users must first load client secrets and generate authorization credentials, potentially via `oauth2l`. Listing adapters requires the publisher ID and ad source ID in the API request, and will return the adapter information that includes details such as ID, Title, platform, and formats.\n"],null,["# Adapters\n\nThe AdMob API has the ability to list\n[mediation adapters](/admob/api/v1/adapters-reference)\nprogrammatically, see\n[`accounts.adSources.adapters.list`](/admob/api/reference/rest/v1beta/accounts.adSources.adapters/list)\nfor additional information. Adapters include details on third-party adapter\nconfigurations.\n\nExamples\n--------\n\nWith [OAuth 2.0 credentials created](/admob/api/v1/getting-started#credentials),\nyou're ready to start using the AdMob API. To request access using OAuth 2.0,\nyour application will also need the scope information.\n\nHere's the OAuth 2.0 scope information:\n\n\u003cbr /\u003e\n\n| Scope | Meaning |\n|------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `https://www.googleapis.com/auth/admob.monetization` | See, create, and edit your AdMob monetization settings. |\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\n\u003cbr /\u003e\n\n### curl (command line)\n\n### Requests using curl\n\n1. Load the [client secrets file](https://console.cloud.google.com/apis/credentials) and generate authorization\n credentials.\n\n The first time you perform this step you'll be asked to accept an\n authorization prompt in your browser. Before accepting, make sure you're\n signed in with a Google Account that has access to the AdMob API. Your\n app will be authorized to access data on behalf of whichever account is\n currently signed in.\n\n For authentication and authorization, we recommend using\n [oauth2l](//github.com/google/oauth2l), a simple command-line tool for\n working with Google OAuth 2.0. Install oauth2l and run the\n command below, replacing \u003cvar translate=\"no\"\u003epath_to_credentials_json\u003c/var\u003e with a path\n to a `credentials.json` file that you download when registering your\n cloud application. For the first run, the command walks you through the\n OAuth 2.0 authorization flow. Subsequent runs refresh the token\n automatically. \n\n ```\n oauth2l header --json path_to_credentials_json --scope admob.readonly\n ```\n2. List the adapters.\n\n Get AdMob adapter information by replacing \u003cvar translate=\"no\"\u003epub-XXXXXXXXXXXXXXXX\u003c/var\u003e\n with your publisher ID, see\n [how to find your publisher ID](//support.google.com/admob/answer/2784578).\n\n Replace \u003cvar translate=\"no\"\u003eSSSSSSSSSSSSSSSSSSSS\u003c/var\u003e with the ad source ID for the\n adapters of interest.\n\n Use the following command to get a list of adapters: \n\n ```\n curl --http1.0 -X GET https://admob.googleapis.com/v1beta/accounts/pub-XXXXXXXXXXXXXXXX/adSources/SSSSSSSSSSSSSSSSSSSS/adapters \\\n -H \"$(oauth2l header --json path_to_credentials_json --scope admob.readonly)\"\n ```\n\n Sample response for the AdMob Network ad source with ID\n `5450213213286189855`: \n\n ```scdoc\n {\n \"adapters\": [\n {\n \"name\": \"accounts/pub-XXXXXXXXXXXXXXXX/adSources/5450213213286189855/adapters/1\",\n \"adapterId\": \"1\",\n \"title\": \"AdMob Network Android SDK\",\n \"platform\": \"ANDROID\",\n \"formats\": [\"BANNER\", \"INTERSTITIAL\",\n \"REWARDED\", \"NATIVE\", \"REWARDED_INTERSTITIAL\", \"APP_OPEN\"],\n \"adapterConfigMetadata\": [{\n \"adapterConfigMetadataId\": \"118\",\n \"adapterConfigMetadataLabel\": \"Ad unit ID\"\n }]\n },\n {\n \"name\": \"accounts/pub-XXXXXXXXXXXXXXXX/adSources/5450213213286189855/adapters/2\",\n \"adapterId\": \"2\",\n \"title\": \"AdMob Network iOS SDK\",\n \"platform\": \"ANDROID\",\n \"formats\": [\"BANNER\", \"INTERSTITIAL\",\n \"REWARDED\", \"NATIVE\", \"REWARDED_INTERSTITIAL\", \"APP_OPEN\"],\n \"adapterConfigMetadata\": [{\n \"adapterConfigMetadataId\": \"119\",\n \"adapterConfigMetadataLabel\": \"Ad unit ID\"\n }]\n }]\n }\n ```"]]