v1.4 of the AdSense Management API is no longer available. Please migrate to v2 as soon as possible.

Method: adunits.getAdCode

accounts.get ad code for the specified ad unit.

HTTP request

GET https://www.googleapis.com/adsense/v1.4/adclients/{adClientId}/adunits/{adUnitId}/adcode

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
adClientId

string

Ad client with contains the ad unit.

adUnitId

string

Ad unit to get the code for.

Request body

The request body must be empty.

Response body

If successful, the response body contains an instance of AdCode2.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/adsense
  • https://www.googleapis.com/auth/adsense.readonly