you need to query the /profile/list to get the profileId see http://code.google.com/apis/health/docs/2.0/reference.html#ClientLoginProfileListFeed
hopes that help On Feb 10, 2:44 pm, vhrao <[email protected]> wrote: > After successfully authenticating with ClientLogin, I am trying to get > a feed from h9 account > > authFactory = new GAuthSubRequestFactory("weaver", > "exampleCo-exampleApp-1"); > HealthService service = new > HealthService(authFactory.ApplicationName); > service.RequestFactory = authFactory; > service.setUserCredentials("[email protected]", "mypwd"); > HealthQuery profileQuery = new > HealthQuery("http://www.google.com/h9/feeds/profile/ui/"); > try > { > authToken = service.QueryAuthenticationToken(); > Console.WriteLine("authenticated user credentials"); > } > catch (InvalidCredentialsException e) > { > Console.WriteLine(e); > } > HealthFeed feed = service.Query(profileQuery); > foreach (AtomEntry entry in feed.Entries) > { > profileName = entry.Title.Text; > profileId = entry.Content.Content; > Console.WriteLine("\tProfile " + entry.Title.Text + > " has ID: " + entry.Content.Content); > } > I get exception on service on line: HealthFeed feed = > service.Query(profileQuery); > Google.GData.Client.GDataRequestException: Execution of request > failed:https://www.google.com/h9/feeds/profile/ui/---> > System.Net.WebException: The remote server returned an error: (400) > Bad Request. > > I change the ProfileQuery URI like this > HealthQuery profileQuery = new > HealthQuery("https://www.google.com/h9/feeds/profile/ui/"); > > I get same exception. > > Can someone please help. I have spent 2 days trying to figure how to > get ProfileId so I can delete an entry. > I am not even close to it. > > Eric: > I am using the URI format for the Query suggested by you in earlier > threads and it does not work for me. Can you please help me out here. -- 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.
