Skip to content

T3Credentials

Base classes

Name Children Inherits
BaseModel
pydantic.main
!!! abstract "Usage Documentation"

⋔ Inheritance diagram

graph TD
  106982418176192["auth.T3Credentials"]
  106982291377056["main.BaseModel"]
  129768776280576["builtins.object"]
  106982291377056 --> 106982418176192
  129768776280576 --> 106982291377056

🛈 DocStrings

Bases: BaseModel

What a successful sign-in yields; persist it to reconnect without pairing again.

The token is an ordinary environment session with subject mcp-client. /mcp is the only endpoint that accepts it: the native WebSocket RPC and REST API reject this subject, because their surface would let the client act above its approved level. Revoke it in T3 Code under Settings -> Sharing & access.

Source code in src/pyt3client/models/auth.py
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
class T3Credentials(BaseModel):
    """What a successful sign-in yields; persist it to reconnect without pairing again.

    The token is an ordinary environment session with subject `mcp-client`.
    `/mcp` is the only endpoint that accepts it: the native WebSocket RPC and
    REST API reject this subject, because their surface would let the client
    act above its approved level. Revoke it in T3 Code under
    Settings -> Sharing & access.
    """

    base_url: str
    """Environment origin without a trailing slash, such as `http://127.0.0.1:3773`."""
    environment_id: str
    """The environment the token belongs to; check it against the descriptor before reuse."""
    access_token: SecretStr
    expires_at: datetime
    scopes: tuple[str, ...]
    access: McpAccess
    client_id: str

base_url instance-attribute

base_url: str

Environment origin without a trailing slash, such as http://127.0.0.1:3773.

environment_id instance-attribute

environment_id: str

The environment the token belongs to; check it against the descriptor before reuse.

:fa-brands-github: Show source on GitHub