Platform

Platform

 View Only
  • 1.  How long is API token valid for ?

    Posted Tue May 05, 2020 11:30 PM

    Anyone know how long the API token is valid for. It used to be valid for 12 hours before and now we are seeing its expiring in 1 hour. Any idea how to increase it ?



    #Platform


  • 2.  Re: How long is API token valid for ?

    Posted Wed May 06, 2020 09:59 AM

    @Gregory Nutt can you help?


    #Platform


  • 3.  Re: How long is API token valid for ?
    Best Answer

    Posted Wed May 06, 2020 10:39 AM

    Hey @Ankoosh Jain - I will assume you are referring to the Apptio OpenToken we generate as part of our API authentication method.  If I am incorrect, please elaborate to which Token you are referring.

     

    I, unfortunately, do not have hard documentation to share with you on this topic, but this is what I understand to be true:

    • Apptio OpenToken is valid as long as your session is 'active' - meaning there has been some activity utilizing that token within a given time span.  I believe this time span is about 30m.
    • Apptio OpenToken is valid for a maximum of 12 hrs (if I recall correctly).  So, even if you ping the system every 5m, your token will expire after that maximum threshold.

     

    I'll once again restate that the time frames above may be different now from when I hit this same roadblock previously, but the structure detailed above should be an accurate representation and the values close to the truth.  I believe both of these limits are in place for security reasons and I believe it would be best practice, if your use case requires a session that spans multiple hours, would be to re-authenticate and generate a new Token each time you need one.


    #Platform


  • 4.  Re: How long is API token valid for ?

    Posted Wed May 06, 2020 10:52 AM

    Thanks Gregory and Renee. This is very helpful. Now we know why our automation was failing. We will generate a new token to read back from Apptio as there was difference of 1 hour. I think the time span is 60 mins as we did test with 55 mins it pass and if we do a test of 60 mins it fails. 

    Once again thank you so much. 


    #Platform