3 messages in com.googlegroups.google-picasa-data-apiRe: How to authenticate the user to a...
FromSent OnAttachments
smith07 Aug 2007 05:51 
smith09 Aug 2007 21:35 
Ryan Boyd (Google)12 Aug 2007 21:59 
Subject:Re: How to authenticate the user to access private album in client application using gdata libary
From:Ryan Boyd (Google) (api.@google.com)
Date:08/12/2007 09:59:20 PM
List:com.googlegroups.google-picasa-data-api

Hi,

On Aug 9, 9:35 pm, smith <mond@gmail.com> wrote:

i have tried to authenticate the user

i have previously collected the "token"

and send the "token" using

String sessionToken = AuthSubUtil.exchangeForSessionToken(token,null); googleService.setAuthSubToken(sessionToken, null);

this method.

But it generating error that "no root to host connect"

This appears to be a networking issue. Authenticating via AuthSub requires a HTTPS connection to www.google.com. Does your network require connecting via a proxy server, or is it possible that outbound connections to www.google.com:443 are being blocked by a firewall?

Although connection is establish if i comment the above code.

if i used

String onetimeUseToken = AuthSubUtil.getTokenFromReply(request.getQueryString()); String sessionToken = AuthSubUtil.exchangeForSessionToken(token,null); googleService.setAuthSubToken(sessionToken, null);

it generating nullpointer exception

The null pointer exception is likely due to passing 'token' to exchangeForSessionToken instead of 'onetimeUseToken'

without that i have not able to get the unlisted photo in my browser.

plz send me the code of authentication in detail

It looks like your code is correct, but you're having an issue connecting to www.google.com:443.

As a test to see if you're able to connect to that host from your server outside of the AuthSub process, you could try retrieving the URL "https://www.google.com/accounts/Login"

Cheers, -Ryan