Method: accounts.adUnits.adUnitMappings.create

  • Create an ad unit mapping under a specific AdMob account and ad unit using an HTTP POST request.

  • This method requires specific authorization and might need account manager approval if access is denied.

  • The request should include the parent account and ad unit information in the URL path.

  • The request body should contain an AdUnitMapping object, and a successful response will return the newly created AdUnitMapping.

  • You'll need the https://www.googleapis.com/auth/admob.monetization OAuth scope for authorization.

Create an ad unit mapping under the specific AdMob account and ad unit.

HTTP request

POST https://admob.googleapis.com/v1beta/{parent=accounts/*/adUnits/*}/adUnitMappings

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent which owns the ad unit mapping. Format: accounts/{publisherId}/adUnits/{adUnitId}

Request body

The request body contains an instance of AdUnitMapping.

Response body

If successful, the response body contains a newly created instance of AdUnitMapping.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/admob.monetization

For more information, see the OAuth 2.0 Overview.