Re: [0-58918156] 401 Authentication Error

121 views
Skip to first unread message

Schalk Keun

unread,
Oct 3, 2012, 2:32:18 AM10/3/12
to adsen...@googlegroups.com
Thanks Sérgio,

That was the problem, I figured it out just after I placed the post. :)

On Tue, Oct 2, 2012 at 3:19 PM, <adsen...@googlegroups.com> wrote:
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.:


Is that perhaps the issue?

Cheers,
Sérgio

---
Sérgio Gomes
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

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.

Reply all
Reply to author
Forward
0 new messages