Resources
Principal Sessions
Create end-user dashboard sessions
Response (
Last modified on August 29, 2026
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Create end-user dashboard sessions
session, err := client.PrincipalSessions.Create(ctx, grantex.CreatePrincipalSessionParams{
PrincipalID: "user-123",
ExpiresIn: "1h",
})
fmt.Printf("Dashboard: %s\n", session.DashboardURL)
| Parameter | Type | Required | Description |
|---|---|---|---|
PrincipalID | string | Yes | The user to create a session for |
ExpiresIn | string | No | Session duration (default: "1h") |
PrincipalSessionResponse)| Field | Type | Description |
|---|---|---|
SessionToken | string | Short-lived JWT for API access |
DashboardURL | string | URL to the permissions dashboard |
ExpiresAt | string | ISO 8601 session expiry |
session, _ := client.PrincipalSessions.Create(ctx, grantex.CreatePrincipalSessionParams{
PrincipalID: currentUser.ID,
})
// Redirect or embed session.DashboardURL in an iframe