You need to use secure=false with localhost. You're requesting a secure=1 token, so you'll need to sign the request with your private key: http://code.google.com/apis/health/docs/2.0/developers_guide_dotnet.html#AuthSubURL and http://code.google.com/apis/gdata/authsub.html#request-one-time-token
You'll need to register your domain and upload a certificate as described here: http://code.google.com/apis/health/getting_started.html#DomainRegistration If you still want to use secure=0 tokens and localhost for the moment, use: String authSubUrl = AuthSubUtil.getRequestUrl(nextUrl, scope, false, true); Eric On Jan 8, 2:05 am, Vivek Pawar <[email protected]> wrote: > Hello all, > I am getting Unknown authorization header while reading profile/ > default. > I am getting Token by > String authSubLink = AuthSubUtil.getRequestUrl("https", > "www.google.com", > "/h9/authsub", "http://localhost/ > GetGHTokan/Default.aspx", > "https://www.google.com/h9/feeds/", > true, true); > > And reading profile by .... > GAuthSubRequestFactory authFactory = new GAuthSubRequestFactory > ("weaver", "Health-Profile-Tester"); > authFactory.Token = (String)Session["token"]; > // authFactory.PrivateKey = getRsaKey(); > > HealthService service = new HealthService > (authFactory.ApplicationName); > service.RequestFactory = authFactory; > > HealthQuery profileQuery = new > HealthQuery("https://www.google.com/h9/feeds/profile/default"); > profileQuery.Digest = true; > //profileQuery.ExtraParameters = "max-results=5"; > try > { > HealthFeed feed = service.Query(profileQuery); > > foreach (HealthEntry entry in feed.Entries) > { > ............... > ........................ > ................ > > Please tell me what is wrong with this. > > Thanks > Vivek --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Health Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/googlehealthdevelopers?hl=en -~----------~----~----~----~------~----~------~--~---
