Per this answer, configuring defaultTokenDuration is the way to change the lifespan of hidden entries' share links from the default 24 hours. The v2 docs describes this as affecting "system tokens" but no further explanation of system tokens is provided. The v3 docs refers simply to "tokens."

[edit: I believe one other thing this controls is the lifespan of password reset tokens.]

I'd like to increase the lifespan of draft entries' share links, but wonder what other consequences I should take into account before changing defaultTokenDuration. What all does it affect?


Currently (as of Craft 3.0), it will affect entry and category share links. Some additional things might be using it in the upcoming 3.1 and plugins are free to use it for whatever they want.

For example, in Commerce 2, it is used for creating product preview share links.

  • Thanks for clarifying. Has this changed significantly in 3.1+, Brad? It'd be helpful to understand the scope of defaultTokenDuration in the documentation. – Carrie Kendall Jan 11 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.