Hi Schalk,When requesting the OAuth 2.0 token, you should include the scopes for both the Analytics API and the AdSense Management API in the request, i.e.:scope = "https://www.googleapis.com/auth/analytics.readonly https://www.googleapis.com/auth/adsense.readonly"
Is that perhaps the issue?Cheers,Sérgio---Sérgio GomesDeveloper RelationsGoogle UK LimitedRegistered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQRegistered in England Number: 3977902Google Inc.| Developer Relations | AdSense API Team | developers.google.com/adsense
Follow us on our Google Ads Developer page on Google+ and our Google Ads Developer Blog to learn more about the different Ads APIs at Google.
On 10/01/12 08:24:01 "Ragers" <emo...@gmail.com> wrote:Hi,
I'm busy developing a site using Analytics and AdSense.
I started the project to fetch data from Analytics with the latest OAuth 2.0 and Analytics API V.3
The Analytics API is working 100% fine, I got all the information I required, and the OAuth token is saved correctly.
Now:
The same with AdSense. I have the latest AdSense Management API, Using the same OAuth library as the Analytics but when I try to do any call on the AdSense API I get a Fatal Error:
Fatal error: Uncaught exception 'apiServiceException' with message 'Error calling GET https://www.googleapis.com/adsense/v1.1/accounts?key=mykeyhere(just took it out for safety): (401) Invalid Credentials' in C:\Users\Documents\Workspace\site\library\plugins\analytics\google\io\apiREST.php
Can anyone explain what I'm doing wrong here?
Regards
Schalk Keun
--
You received this message because you are subscribed to the Google Groups "AdSense API Forum" group.
To view this discussion on the web visit https://groups.google.com/d/msg/adsense-api/-/UveZIyuvsMQJ.
To post to this group, send email to adsen...@googlegroups.com.
To unsubscribe from this group, send email to adsense-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/adsense-api?hl=en.