Hey Dan!
Before starting to code, make sure you're using the correct account. Go into incognito mode and use the APIs explorer:
Authenticate and try to fetch your ad clients. If you do have an AdSense account you should have no problems.
(AdSense account != developer account)
Cheers,
Jose
---Jose Alcérreca
Developer Relations
Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
Registered in England Number: 3977902
On Wednesday, 6 March 2013 23:13:00 UTC,
ysm...@yahoo.com wrote:
I am trying to use AdSenseSample.java to call the java API to authenticate and download account data through an installed application.
I have obtained an authentication code and exchanged it for an Auth/Refresh token and have setup files client_secrets.json and adsense.json
It appears that I am getting past the authentication step OK
AdSense adsense = initializeAdsense();
But receiving an error when calling
Accounts accounts = GetAllAccounts.run(adsense, MAX_LIST_PAGE_SIZE);
=================================================================
Listing all AdSense accounts
=================================================================
403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "User does not have an AdSense account.",
"reason" : "noAdSenseAccount"
} ],
"message" : "User does not have an AdSense account."
}
Can you suggest next steps to figure out whyI can't get account and adclient data?
Thanks,
-Dan