Re: 403 Forbidden error with message "User does not have an AdSense account."

227 views
Skip to first unread message

Jose Alcérreca (AdSense API Team)

unread,
Mar 7, 2013, 9:44:12 AM3/7/13
to adsen...@googlegroups.com
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


Google Inc.| Developer Relations | AdSense API Team | developers.google.com/adsense



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
 

Jose Alcérreca (AdSense API Team)

unread,
Mar 8, 2013, 4:59:16 AM3/8/13
to adsen...@googlegroups.com, dze...@yahoo-inc.com
Great! I'll use code to explain things more often in the future :)

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


Google Inc.| Developer Relations | AdSense API Team | developers.google.com/adsense


On Thursday, 7 March 2013 18:45:05 UTC, ysm...@yahoo.com wrote:
Thanks Jose! 
 
The tip:  AdSense account != developer account   ....  led me to a breakthrough and progress today.   I repeated my authentication steps using a different account used as a developer account, granted access in the AdSense account to this developer account and now I can download stats from the AdSense account.
 
Thanks again,
-Dan
 
Reply all
Reply to author
Forward
0 new messages