Method: accounts.adUnits.list

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.