thanks
On Dec 28, 6:53 pm, "Eric (Google)" <[email protected]> wrote: > Hi Erez, > > You're using ClientLogin (username/password) so you don't > need to register a domain. > > The feeds for ClientLogin are different than > AuthSub's:http://code.google.com/apis/health/docs/2.0/reference.html#ClientLogi... > > You need to queryhttps://www.google.com/h9/feeds/profile/listfirst > for > a profileID, then queryhttps://ww.google.com/h9/feeds/profile/ui/ID > > Cheers, > Eric > > On Dec 25, 5:49 am, "[email protected]" <[email protected]> wrote: > > > > > hi > > > Using .Net as a client tesktop application i am trying to get some > > records from the sand box(using h9) > > when calling the service.Query method i am getting an exception: > > "Token invalid - Invalid AuthSub token. > > Error 401" > > Am i doing something wrong? do i need to register a domain although I > > am trying to access > > to sand box from a client desktop application? > > > here is the code i wrote > > > GAuthSubRequestFactory authFactory = new > > GAuthSubRequestFactory("weaver", "exampleCo-exampleApp-1"); > > > HealthService service = new HealthService("exampleCo- > > exampleApp-1"); > > > service.RequestFactory = authFactory; > > service.setUserCredentials(<Email>, <Password>); > > > string token = service.QueryAuthenticationToken(); > > HealthQuery profileQuery = new > > HealthQuery("https://www.google.com/h9/feeds/profile/default"); > > profileQuery.Digest = true; > > try > > { > > // ******** HERE IS THE EXCEPTION > > HealthFeed feed = service.Query(profileQuery); > > //******** > > foreach (HealthEntry entry in feed.Entries) > > { > > XmlNode ccr = (XmlExtension) > > entry.FindExtension("ContinuityOfCareRecord", "urn:astm-org:CCR"); > > if (ccr != null) > > { > > StringWriter sw = new StringWriter(); > > XmlTextWriter xw = new XmlTextWriter > > (sw); > > xw.Formatting = Formatting.Indented; > > ccr.WriteTo(xw); > > Console.WriteLine(sw.ToString > > ()); > > } > > } > > } > > catch (GDataRequestException e) > > { > > > } > > > thnks, > > > Erez- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
