Re: About persisting authentication for Java program

29 views
Skip to first unread message

Sérgio Gomes

unread,
Jun 22, 2012, 9:04:21 PM6/22/12
to adsen...@googlegroups.com
Hi there,

What sort of application are you developing? Is it a desktop application, a general web server application, or an AppEngine application? This involve slightly different flows, so it would be helpful to know.

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 Wednesday, June 20, 2012 7:11:07 PM UTC+1, Xiaohu wrote:
Hi all,

I want to use Adsense Management API to grab my adsense account data daily. The plan is to develop a Java program that does this.

Right now I have a working example Java program, but every time I need to manually click "allow access" button to proceed. I know that we can persist authentication information by looking at the doc.  So does anyone know a working example that persists authentication for Java programs.

Thanks in advance.
X

Dor Ben Dov

unread,
Jun 28, 2012, 8:15:06 AM6/28/12
to adsen...@googlegroups.com
Sergio,
In case it's a server that need to call this service (no user in the middle) and get results, do you have any code example on how to do the oauth 2.0 authentication procedure ? 

Sorry for interrupting Xiaohu.
Regards,
Dor

Sérgio Gomes

unread,
Jun 28, 2012, 10:54:33 AM6/28/12
to adsen...@googlegroups.com
Hi Dor,

In that case, I'd suggest you look at either the installed application or web server flows and use those for the initial authentication of your app. After that, just make sure you store and reuse the credential data, and you should never have to authenticate again. The client library guide should get you started.

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