1

我想做什么?

使用 Google API 列出和创建 AdSense 广告单元。

我尝试了什么?

  1. 转到Google APIs Explorer 上的 adunits.list
  2. 插入到我的 accountId 和 adClientId (pub-XXXXXXXXXXXXXX, ca-app-pub-XXXXXXXXXXXXXX)
  3. 单击“执行”。
  4. 我收到错误 403“客户不是 AdSense 主机”。
  5. 寻找在线答案没有多大成功,所以我在 StackOverflow 上。

任何人都知道如何做到这一点?

谢谢!

4

1 回答 1

4

作为拥有常规 AdSense 帐户的 AdSense 发布商,您不能使用 AdSense for Host API。

AdSense Host API 适用于托管合作伙伴网站(Blogger、WebAnswers、DocStoc 等),它使网站所有者能够与其用户分享收入。

https://developers.google.com/adsense/host/featuresbenefits https://developers.google.com/adsense/host/become-a-host#eligibility

您可以使用 AdSense Management APIadsense.accounts.adunits.list来检索您的单元列表。(但是,您不能使用 Management API 创建新单元。)

https://developers.google.com/adsense/management/v1.4/reference/accounts/adunits/list

于 2014-08-19T09:42:55.680 回答