Any java example of oauth 2 service account (server to server) exist ?

148 views
Skip to first unread message

Dor Ben Dov

unread,
Jul 15, 2012, 6:46:05 AM7/15/12
to adsen...@googlegroups.com

Sérgio Gomes

unread,
Jul 16, 2012, 6:58:10 AM7/16/12
to adsen...@googlegroups.com
Hi Dor,

I'm afraid it's not possible to use OAuth 2.0 service accounts with the AdSense Management API, since it accesses protected user data. Service accounts are only available for access to unprotected data. You'll need to use OAuth 2.0 for installed applications or OAuth 2.0 for web server applications (or OAuth 2.0 for client-side applications if your application runs in Javascript on the user's browser).

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


---
On Sunday, July 15, 2012 11:46:05 AM UTC+1, Dor Ben Dov wrote:

Dor Ben Dov

unread,
Jul 16, 2012, 7:40:22 AM7/16/12
to adsen...@googlegroups.com
Sergio, 
If i just want to access within adsense to get the reports, how many clicks/impressions/ecpm etc' i don't need the oauth 2.0 ? 
Dor

On Sunday, July 15, 2012 1:46:05 PM UTC+3, Dor Ben Dov wrote:

Sérgio Gomes

unread,
Jul 16, 2012, 7:54:13 AM7/16/12
to adsen...@googlegroups.com
Hi Dor,

I'm afraid that's protected user data, even if that user is yourself. You'll need to use OAuth 2.0, as I've mentioned in all of my posts.

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


---
Reply all
Reply to author
Forward
0 new messages