Hello guys! I have question Is there an endpoint o...
# ask-a-descoper
r
Hello guys! I have question Is there an endpoint or a method in the client SDK to dynamically fetch the configured session inactivity timer (in project settings) so we can build auto-logout logic on our side?
d
Session Inactivity Timer Access There isn't a direct API endpoint to fetch project-level session inactivity timer settings. The available APIs focus on tenant-level session settings , not project-level configuration. Available Options 1. Tenant Session Settings API - Use the GET
/v1/mgmt/tenant/settings
endpoint to retrieve session settings for specific tenants
Copy code
curl -X GET "<https://api.descope.com/v1/mgmt/tenant/settings?tenantId=<tenant-id>>"  
  -H "Authorization: Bearer <ProjectId:ManagementKey>"
2. JWT Token Inspection - Session tokens include expiration information that reflects the configured timeout Alternative Approach Since project-level inactivity settings aren't directly accessible via API, consider implementing client-side timeout tracking based on user activity patterns, then use Descope's session validation to confirm token status. • Session inactivity timeout can be configured at project or tenant level • Terraform provider shows inactivity settings structure:
enable_inactivity
and
inactivity_time
Get Tenant Session Settings | API Reference | Descope Documentation Token Validation Key (V1) | API Reference | Descope Documentation Session Management Overview | Descope Documentation Descope Terraform Provider | Descope Documentation