[SOLVED] Token expiration date


When in Mattermost 3.0 I post a request at : mattermost-address/api/v3/users/login with the Json {"login_id":"login", "password":"password"} this return a Token in the header. Does this token expire?

Thanks for your help

Hi @xgerber,

Yes the token expires, you can set the expiration time for the token in System Console -> Security -> Sessions -> Session length LDAP and email (days):

the default value is 30 days.

Hope this helps

Thanks @elias for this answer.

An other question, is it possible to renew it with a restapi call?

Hi @xgerber,

This token does not work as an OAuth2 token that has a way to use a refresh token for that, in this case you’ll need to call login again.

However the OAuth 2.0 Service Provider is being added in Mattermost 3.3 and is being release the 16th of August, right now you have Mattermost 3.3 RC4 available if you want to test that functionality, but you’ll have to wait a little longer for the documentation on how te set it up.

Can you please add [SOLVED] at the beginning of the thread title if you feel that you’re answer has been in fact solved.

Hope it helps

1 Like