api token expiration Skip to main content
https://support.okta.com/help/answers?id=9062a000000bmr5qai&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Hima KotamreddyHima Kotamreddy 

api token expiration

Can API token expiration be extended beyond 30 days?
My application uses API token for authentication.  If no users login for 30 days, the token is getting revoked and it needs an admin to create an new token and change the application configuration to use the new token.  Is there anyway to get around this process?
Ryan Tapp (Admin)Ryan Tapp (Admin)
Hima, I just run a script twice monthly that's only job is to pull 1 active user ('https://myorg.okta.com/api/v1/users?limit=1&filter=status\+eq\+%22ACTIVE%22\') and email me an API "heartbeat".  That pushes the API expiration date 30 days forward each time.
Gabriel SrokaGabriel Sroka (Okta, Inc.)
Hi Hima
I was going to recommend something similar to Ryan, but you can use this URL to make it even simpler:
https://myorg.okta.com/api/v1/me
see:
http://developer.okta.com/docs/api/resources/users.html#get-current-user
Hima KotamreddyHima Kotamreddy
Thank you!  Both the above solutions seem to produce the desired results.