1

Using Java HttpUrlConnection to connect to Good Data apis:

Application while running from localhost always runs perfect but on production the TT token most of the times gets expired in less than a second

2014-12-18 15:43:19.507 - Got SST token cookie=GDCAuthSST=; path=/gdc/account; expires=Sat, 03-Jan-2015 20:43:19 GMT; secure; HttpOnly

2014-12-18 15:43:19.618 - Exchanged it for TT token cookie=GDCAuthTT=fjMPorWZnO22FDhdb9qiapkzhmKKxwf2QANQaU-QXH6xKrUEulgsMdd2TZNmX71JdGfE972qko0Oo51KBMRpn_ofD6F6PhqNAp8GvrOvWGNcXGFnmdfq-Sb-_Eh_md_Vjbb_MhUqpKM93CR_Lbb_m6C1xN8RDYeyJzHxKfXjvJR7InYiOjE0MTg5MzU5OTksInUiOiI2NzU5MzkiLCJ>sIjoiMCIsImsiOiJjMTBmZDUwZi01NzM0LTQzMTgtODE5ZS0yZmE5NjA3MTk2NzIifQ; Path=/gdc; Secure; HttpOnly

2014-12-18 15:43:19.619 - call to server=https://secure.gooddata.com/gdc/md//obj/<1111111>

failed with 401 error and empty TT token

<html><head><title>401 Authorization Required</title></head><body>
<p>This server could not verify that you are authorized to access the document 
requested. Either you supplied the wrong credentials (e.g., bad password), 
or your  browser doesn't understand how to supply the credentials required.
Please see <a href="http://docs.gooddata.apiary.io/#login">
Authenticating to the GoodData API</a> for details.</p></body></html>

cookie=GDCAuthTT=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/gdc; Secure

Kuba Rakoczy
  • 3,954
  • 2
  • 15
  • 16

1 Answers1

0

cookie=GDCAuthTT=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/gdc; Secure

It looks like an invalid token, that's usually a deleted token that will not be stored at all.

There might be a problem when getting the SST token, could you please show me how you are getting that one?

  • Getting SST token by opening url POST https://secure.gooddata.com/gdc/account/login with Json body {"postUserLogin":{"remember":1,"login":"login","password":"password"}} – user3157638 Dec 19 '14 at 14:59
  • At very start the valid SST token is returned and as I mentioed a valid TT token is also returned. The problem is when I make other calls using the TT token, I get the 401 error most of the times. I have implemented retry logic as indicated at https://developer.gooddata.com/article/authentication-via-api NOTE in Phase 2 Some times in tries I am able to get the result other times it just returns 401 error everytime. – user3157638 Dec 19 '14 at 15:06
  • It seems we'll have to investigate further and we'll need some information from you that should not be mentioned here. Please, raise a support ticket in https://support.gooddata.com – Raúl Melgosa Jan 05 '15 at 10:09