Skip to main content
Question

Windows SDK V2: JWT (Server Authentication) Token Expiration

  • May 22, 2025
  • 1 reply
  • 21 views

Forum|alt.badge.img

I've just started working on a server to server box integration. I've worked through authentication and basic calls, but all in a unit testing environment. I've a few things online about token expiration, but I wasn't able to determine if they applied to JWT Server Authentication.

 

Do JWT Server Authentication tokens expire? If so:

 

  1. How often do these credentials expire?
  2. Is there anywhere to see the expiration on the BoxJWTAuth object, or on the BoxClient? I've looked through these objects and can't seem to find anything relating to that.
  3. Is there an code example of how to correctly handle token expiration? (what kind of error gets thrown back and how to catch it)

Thanks!

1 reply

Forum|alt.badge.img

 The access token you get from performing JWT authentication is generally valid for one hour.  The .NET SDK client should handle re-authentication automatically when the token becomes invalid — no manual action on your part should be necessary.