Get
List
nil for no filters.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Manage authorization grants and delegation
grant, err := client.Grants.Get(ctx, "grant-id")
result, err := client.Grants.List(ctx, &grantex.ListGrantsParams{
AgentID: "agent-id",
Status: "active",
})
for _, g := range result.Grants {
fmt.Printf("%s: %v\n", g.ID, g.Scopes)
}
nil for no filters.
err := client.Grants.Revoke(ctx, "grant-id")
resp, err := client.Grants.Delegate(ctx, grantex.DelegateParams{
ParentGrantToken: "parent-jwt-token",
SubAgentID: "sub-agent-id",
Scopes: []string{"read:email"},
ExpiresIn: "1h",
})
fmt.Printf("Delegated token: %s\n", resp.GrantToken)
Grant| Field | Type | Description |
|---|---|---|
ID | string | Grant ID |
AgentID | string | Agent ID |
AgentDID | string | Agent DID |
PrincipalID | string | User ID |
DeveloperID | string | Developer ID |
Scopes | []string | Granted scopes |
Status | string | "active", "revoked", "expired" |
IssuedAt | string | ISO 8601 timestamp |
ExpiresAt | string | ISO 8601 timestamp |
RevokedAt | *string | ISO 8601 timestamp (if revoked) |
DelegateResponse| Field | Type | Description |
|---|---|---|
GrantToken | string | Delegated JWT |
ExpiresAt | string | ISO 8601 expiry |
Scopes | []string | Delegated scopes |
GrantID | string | New grant ID |