Hi Erick, I'm not able to test secure=1 token on h9 at the moment. There's current a problem with logging in to H9 (https:// www.google.com/h9).
Your snippet looks correct. Are you requesting tokens with permission=1? Eric On Dec 5, 3:02 pm, eaudet <[EMAIL PROTECTED]> wrote: > Hi, > > Update: > I have redeploy my code with unsecured calls to H9 and getting profile > is succesful. As soon as I use a secure=1, I cannot get profiles for > some reasons. > > Here is the code I use to exchange a single token to a sesiontoken: > ... > PrivateKey privateKey = > AuthSubUtil.getPrivateKeyFromKeystore( > "/AuthSubExample.jks", "password", > "AuthSubExample", > "password"); > authSubToken = > AuthSubUtil.exchangeForSessionToken(URLDecoder.decode > (singleUseToken, "UTF-8"), privateKey); > ... > > This code never fails but when retreiving a profile using the > authSubToken returned always fails. > > Also: it works before december 2... > > - Erick > > On Dec 5, 2:01 pm, eaudet <[EMAIL PROTECTED]> wrote: > > > Ok, went a little deeper and it appears that one of my user has a very > > hold token that is invalid. Since I am batch processing all users with > > tokens, I am not even getting to the one I fetch a new token with. I > > will change my code to make sure I do bot catch the invalid token. > > That way, my batch processing will ne stop in the middle. > > > This does not explain why the token became suddenly invalid. Maybe it > > was fetched with secure=0 and now since I am using secure=1 it is not > > good anymore... > > > This one is not closed but almost. > > > - Erick > > > On Dec 4, 10:26 pm, eaudet <[EMAIL PROTECTED]> wrote: > > > > Just to make things clearer, I am using a secure=1 access. > > > > On Dec 4, 2:48 pm, "Eric (Google)" <[EMAIL PROTECTED]> wrote: > > > > > There's currently an issue with secure=0 tokens on /h9. > > > > > There should NOT be an issue with secure=1 tokens. I just tested > > > > that, and it works. > > > > Try fetching a new token. > > > > > Eric > > > > > On Dec 4, 9:59 am, eaudet <[EMAIL PROTECTED]> wrote: > > > > > > Hello, > > > > > > No changes in my code to retreive a profile but this message appeared > > > > > while getting profiles from the H9 server somewhere between the 2 and > > > > > 3 december. It happens on my dev (localhost) unsecured (secure=0) and > > > > > also using my preprod secured setup (secure=1) > > > > > > Any help appreciated, > > > > > > Erick > > > > > > com.jarics.mobicoach.webapp.server.HealthSampleException: Error > > > > > retrieving profile > > > > > at com.jarics.mobicoach.webapp.server.HealthSample.getProfile > > > > > (HealthSample.java:181) > > > > > at > > > > > com.jarics.mobicoach.webapp.server.ExerciseRemoteServiceImpl > > > > > $GoogleHealthNotifier.sendHealthNotice(ExerciseRemoteServiceImpl.java: > > > > > 508) > > > > > at > > > > > com.jarics.mobicoach.webapp.server.ExerciseRemoteServiceImpl > > > > > $GoogleHealthNotifier.run(ExerciseRemoteServiceImpl.java:481) > > > > > at java.lang.Thread.run(Thread.java:595) > > > > > Caused by: com.google.gdata.util.ServiceForbiddenException: Forbidden > > > > > Oops an error has occured. > > > > > Please include the following information in your error report: > > > > > > AP52v_QN5i9OdysDCZkuEfcLvhuKHUFV2vks8QUF8UPRx90R7HbQXHunsR9hbzVinpV7ZpG9XsAZ2tBS > > > > > Iq_StDaVYaylAdRNXUWtG6ote4gynOWH=================Y1c- > > > > > k5DgpgKRYyd9Ghtlcxmbm1LuH82 > > > > > srTDq5RIqzjbehe_AeP1iKu===================================15CVjMqIRyyOtPU_wDRhz1 > > > > > NWzFhQv_Yel683zaz4w-==========================================I- > > > > > fwr2VmvQHZzBD695 > > > > > ElceJeVeTyZFXtNKV=============f9rkts5kUkWcq2ZD0dvRv==============yc9LCiqFbjHGRv7 > > > > > dJc2fHOBt7azQ- > > > > > ===========he9E5FHtrtQOpb_zIirSNsbCYA2K7Kv============_yXx8ZGVwxhn > > > > > VTsvR5hrLoZ===========OCmVPA2npR6y-XUOnSFuT7UVp3KO3JmfboQf- > > > > > ===========A_86d1pVxZ > > > > > HHnTRzdGI==========dprw4O3Z7kW260ch_8E1yoIJZpK3Dy7ybLFlfdrWodg=========_sdhv7lyj > > > > > 9G1A5Ud==========LRXi6Y======amcWmjbmxVuQwPjBegdW1hD======4QoBPE=========cKtkjKo > > > > > RNjkUW=========55RDPiYJ==zf==yQtbgcHWtPlhSuaNETFxyjC==zX==YMiBhbQz========ujBqXN > > > > > 6XmuD========H-1LIqngJn======WWe1ApRGc5B2qo6IyymyUSm======hLOlJitc26=======bLsku > > > > > CMZjA======jYYGGTxxMvo7xDUwQ0lu1JhM8_FDp2VQ7MxQv04E4r_ZCpki1rzSj3gTCw======nKVB1 > > > > > yuCc======JVp6uuHP9A55wS4UmSI93vreESZO0Cwm4IFA_eqHCDNGg9llv8dBdUHMDetT======2EW0 > > > > > T-jd======1v389sueXkzyfnqKvPSoG_ZHYMa2w- > > > > > BFRIEaxpSCjZ4kInAUS1rMWeBFecUF======w9Nl > > > > > ReZ======999bn4tTAnUxWP1HDw6UsVAnnVKMu6b8vvfAgrfnRpIUffxIhCR- > > > > > vY0b6yjBTw======zI8 > > > > > yJz======PeJGAcF199I4x7I3RuhmWI==================d4CVpbmJ2CWmQdNp6qhmk5======bef > > > > > Blr======HIl5AKzKFFPuOw5uxS==========================cDvVEVvzNdB- > > > > > d6BL2K======EkN > > > > > roV======HjY- > > > > > kOPeQtDz3k9=============YNLHrQ=============DlJgQaat8JfuEcC======0Vy > > > > > 3ida======LBHkxNXj3FZX===========x9Y6NDKN5k6LqQ===========FHDyukUSIenb======vSg9 > > > > > UL7d======BoSNR35P58o=========nH4oHaCFD5JsiEvN0Vce=========SamGM4HV- > > > > > Gt======pcQf > > > > > 6-biy======o5mAUOuIEz=======3pPMLyUAIgvDDyWeRH-KMTLb=======v- > > > > > dFTAylRt======Hfbca > > > > > 10hRo========Ru5DwYut8====Il0YC6nD- > > > > > KN8x0CbfPiewr3FCApUt====s63L2w026=======Nx7CF > > > > > dJ0y65=========mnd6q- > > > > > bLbnxZSMGALp4LxkGAhzNxNywOs48ghMYgPqt0OeFw1hu========Jlut9E > > > > > 9JML-Cm==========dLRSV8oLM8AAh-74nFkkzVTjwxDyubY8c2RRBqRUhL- > > > > > fyp9=========R-a9Avb > > > > > DJjzMipdS==========lC6x-XEEJpryEJ- > > > > > YIaZRh9ag_tI_CSKwSIsMvW63Toc=========hqUwaJCdJ > > > > > N9ZQP- > > > > > Naj9r===========9Ek9GYBMfBN3GpQ0iEV5aC3TWno63cy8T2wFu===========mXVScHcvTD > > > > > L56pZ6PH8swaDL===========v4mLLqa0qU3g8PPbZFuVBRHlouUV4hV============MIYas6sc1D8- > > > > > dQ- > > > > > wbh0hO0hNDqJ06=============H0ek_D6p8NRpzYeAkKQoj==============XJPEH6oFBKEZnw7 > > > > > pKHf5t9VxeTJ5sF3ZR8M==========================================DkaPtqB6KMvRnqI3dP > > > > > a_do9j_8Wrq4FYTFEXwbMeW===================================eVP-1fEGrX43dk6w4IZTQd > > > > > Gdc4lg7NETUwHridOlTX89gz4uibNdsy=================4KO6wKjE0pLqUSuqQf4AYmaaSiEhxrp > > > > > Rn4eZV03QuTqBsu7UbGDyUaVwxq77EE3M4a3av96I-08UjTcFr8vOt9rDO_8SB_bymZUYMTHUbdD8olz > > > > > > NbANlXU1zq6ZVeQpDJH6v3H1xCPW4U794J3Ueyxzu9yex5vUVwc4226ixOjX2qbttIAe- > > > > > _0OC_K-HMzH > > > > > Rn7BYvauTZjB- > > > > > ncobCEu_4GYB3gdhgRH=================1n_FIEG3QTzrXd_gXZGcYt-Jrta3Lpf > > > > > P7oioWXt9bnqBxIH8FY9lo7===================================KMPIO- > > > > > Vdw6XeRQfHBokXTi > > > > > SatHX1tklkjvV4I2pRdt==========================================pjuGkXeOp61H7SdcoZ > > > > > kaJhdzi6RJBq7mA- > > > > > a=============J4AlwsCZudNS676SScRBP==============cBnN8mfjEifFxB1 > > > > > xBnxtX3ylR8BQm===========FAsAubUMrJFDuuePoF_4gPWhYCkV9QG============fK5hfXVS0enD > > > > > LElGzS2rwjc===========CYifrN7DvpdyGdRMOK7sL4ASObam6FXk8k6pF===========cQ1eNMCERO > > > > > 49Im5i2cW==========JNKmxmZqIfCefzJCuzUXajb4Mj8wjWUmb7sqCDccTQA=========g- > > > > > ZyroyDI > > > > > loUpYEz==========-H0GXl======nPbS79kn5Pj3uxhwEN- > > > > > prGV======L9tsVa=========O9p4H_Z > > > > > vjkj0V=========v6xIOWsJ==XX==BhvpZkgGewYqcsQsiOPMjHd==ow==i2zNJ0Xd========5JUlFW > > > > > WcodP========36joA-006t======2PsvY7SzU20uC33UMwcLwc_======DZ9LC_MXtM=======S2Dul > > > > > z4BG1======hjcdziz0qgRd5bpqWggQzSMpsZQzGNdEXRi7uPdOR22WJ3VHkqE_6PfE90======3HHrv > > > > > ERM6======2nuW9nD9aRh3S1kdhIBHaSAgztr9bebHw- > > > > > pBL1BXkGaGMHFMzDKOHMUfQVV7======oGFN > > > > > z3u7======kbjBphnouaZehsQckC5-50mTTi70dXBkVhRbzasK4LjPlbiY6jUS51ajdFWi======GA4Q > > > > > 8Bh======Ak_H68J9ZRz7cHCZU4oCKABxaJOT-zHIBojydBM0QEM2y- > > > > > RpJ5Hd2E4zdRG45s======H-v > > > > > ZhS======rrSu1x01HDf2d6tVHRQ2d2==================Z9lThAvqIwAgoklHQgcXtg======ZWL > > > > > Hsj======0XZJfs4qb-_O6hj6uI==========================sQ62x-UMW- > > > > > S2udX20G======zNf > > > > > CeL======iKHBZV1N65y3VE6=============N9E4pf=============3fY= > > > > > > at > > > > > com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse > > > > > (HttpGDataRequest.java:504) > > > > > at > > > > > com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse > > > > > (GoogleGDataRequest.java:558) > > > > > at com.google.gdata.client.http.HttpGDataRequest.checkResponse > > > > > (HttpGDataRequest.java:479) > > > > > at com.google.gdata.client.http.HttpGDataRequest.execute > > > > > (HttpGDataRequest.java:458) > > > > > at com.google.gdata.client.http.GoogleGDataRequest.execute > > > > > (GoogleGDataRequest.java:530) > > > > > at com.google.gdata.client.Service.getFeed(Service.java:865) > > > > > at com.google.gdata.client.Service.getFeed(Service.java:806) > > > > > at > > > > > com.google.gdata.client.GoogleService.getFeed(GoogleService.java: > > > > > 614) > > > > > at com.google.gdata.client.Service.query(Service.java:1102) > > > > > at com.google.gdata.client.Service.query(Service.java:1045) > > > > > at com.jarics.mobicoach.webapp.server.HealthSample.getProfile > > > > > (HealthSample.java:174) > > > > > ... 3 more --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
