Google Adsense Services Account

前端 未结 2 1232
夕颜
夕颜 2021-01-25 05:31

I have the problem with Google Adsense API. I used Services Account to authen, and this is my code:

require_once dirname(__FILE__) . \'/google-api-php-client/Goo         


        
相关标签:
2条回答
  • 2021-01-25 05:40

    Unfortunately at the moment AdSense API doesn't support Service Account, so AdSense data is invisible for API (that's why you getting that error).

    Perhaps the best solution is to use "Web application" login: https://developers.google.com/adsense/management/getting_started#auth

    0 讨论(0)
  • 2021-01-25 05:42

    Service accounts are not available in the AdSense Management API.

    If you want to use the API without user intervention, you can use the "Web application" or "Installed application" scenarios. Once the user grants access to your app, you can start requesting access tokens.

    Check out the PHP samples: https://code.google.com/p/google-api-php-client/source/browse/#svn%2Ftrunk%2Fexamples%2Fadsense

    0 讨论(0)
提交回复
热议问题