# Is there a way refresh session/token?

**URL:** https://community.dreamfactory.com/t/is-there-a-way-refresh-session-token/1229
**Category:** REST API
**Created:** [June 28, 2015, 1:56am UTC](https://community.dreamfactory.com/t/is-there-a-way-refresh-session-token/1229 "2015-06-28T01:56:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![allensandiego](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@allensandiego](https://community.dreamfactory.com/u/allensandiego)
#### Post date: [June 28, 2015, 1:56am UTC](https://community.dreamfactory.com/t/is-there-a-way-refresh-session-token/1229/1 "2015-06-28T01:56:18Z")

</div>

Hi,

Does dreamfactory have a api/method to refresh the session/token? I’m working on an android app and wanted a feature that allows user to authenticate only once. Then succeeding use of the app, users should not have to login with their username and password again. The client can just refresh the session/token whenever it expires or becomes invalid.

I noticed while playing around with the /rest/user/session api is that there is a duration value passed. I can probably set this to a million or something to keep the user authenticated for a long time but I’m not sure if this is the right way to do it.

Appreciate your feedback.

Thanks,  
Allen

---

<div class="post-metadata">

### Author: ![benbusse](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/benbusse/32/4_2.png) [@benbusse](https://community.dreamfactory.com/u/benbusse)
#### Post date: [June 28, 2015, 4:04pm UTC](https://community.dreamfactory.com/t/is-there-a-way-refresh-session-token/1229/2 "2015-06-28T16:04:39Z")

</div>

This feature ship in Version 2.0. Beta will be available in about a week on GitHub. 2.0 uses JSON Web Tokens and your client app can authenticate once and just refresh the token periodically.

---

<div class="post-metadata">

### Author: ![allensandiego](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@allensandiego](https://community.dreamfactory.com/u/allensandiego)
#### Post date: [June 29, 2015, 1:20am UTC](https://community.dreamfactory.com/t/is-there-a-way-refresh-session-token/1229/3 "2015-06-29T01:20:48Z")

</div>

Thanks. Looking forward to this.
