Method: accounts.adUnits.list
Stay organized with collections
Save and categorize content based on your preferences.
List the ad units under the specified AdMob account.
HTTP request
GET https://admob.googleapis.com/v1beta/{parent=accounts/*}/adUnits
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
parent |
string
Required. Resource name of the account to list ad units for. Example: accounts/pub-9876543210987654
|
Query parameters
Parameters |
pageSize |
integer
The maximum number of ad units to return. If unspecified or 0, at most 10,000 ad units will be returned. The maximum value is 20,000; values above 20,000 will be coerced to 20,000.
|
pageToken |
string
The value returned by the last ListAdUnitsResponse ; indicates that this is a continuation of a prior adUnits.list call, and that the system should return the next page of data.
|
Request body
The request body must be empty.
Response body
Response for the ad units list request.
If successful, the response body contains data with the following structure:
JSON representation |
{
"adUnits": [
{
object (AdUnit )
}
],
"nextPageToken": string
} |
Fields |
adUnits[] |
object (AdUnit )
The resulting ad units for the requested account.
|
nextPageToken |
string
If not empty, indicates that there may be more ad units for the request; this value should be passed in a new ListAdUnitsRequest .
|
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/admob.monetization
https://www.googleapis.com/auth/admob.readonly
For more information, see the OAuth 2.0 Overview.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-05-14 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-05-14 UTC."],[[["This page explains how to list ad units associated with a specific AdMob account using the `adUnits.list` method."],["The method requires the `parent` path parameter to specify the AdMob account and accepts optional `pageSize` and `pageToken` query parameters for pagination."],["Successful responses provide a list of `AdUnits` and a `nextPageToken` for retrieving additional pages if available."],["Authorization is required using either `https://www.googleapis.com/auth/admob.monetization` or `https://www.googleapis.com/auth/admob.readonly` OAuth scopes."]]],["This document details how to list ad units associated with a specific AdMob account. The process involves sending a `GET` request to `https://admob.googleapis.com/v1beta/{parent=accounts/*}/adUnits`, where `parent` is the account's resource name. Optional query parameters, `pageSize` (up to 20,000) and `pageToken` (for pagination), can be included. The request body must be empty. The response includes an array of `adUnits` and a `nextPageToken` for further results. Authorization requires specific OAuth scopes.\n"]]