Hi,

I am trying to access H9 sandbox from my web-site
https://healthforce-developer-edition.na7.force.com

I am able to get the one-time use token but if I try to
get a session token I get the following redirect code (302)
in my response.

<HEAD>
<TITLE>Moved Temporarily</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Moved Temporarily</H1>
The document has moved <A HREF="https://www.google.com/accounts/
ServiceLogin?service=weaver&amp;nui=1&amp;continue=https%3A%2F
%2Fh9.google.com%2Fh9%2Fauthsub&amp;followup=https%3A%2F
%2Fh9.google.com%2Fh9%2Fauthsub&amp;rm=hide">here</A>.
</BODY>
</HTML>



Here are my request headers

req.setEndpoint('https://h9.google.com/h9/authsub');
req.setHeader('GData-Version', '2');//adding/removing makes no
difference
req.setMethod('GET');
req.setHeader('X-If-No-Redirect', '1' );
req.setHeader('content-type', 'application/x-www-form-
urlencoded' );
req.setHeader('Authorization','AuthSub token="' + requestToken+'"');//
request token is obtained dynamically
req.setHeader('Accept-Encoding','compress, gzip');//adding/removing
makes no difference



Another thing I noticed is that if I check the Link Status in Google
Health->Settings
my website is not listed there.

The implementation is done in Apex (Salesforce.com API language) which
is 90% similar to java.

I have spent around 2 days trying to get this to work but in vain.
Any help would be greatly appreciated.


Thank you




-- 
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.

Reply via email to