Skip to content

T3NativeCredentials

Base classes

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

⋔ Inheritance diagram

graph TD
  106982418154656["auth.T3NativeCredentials"]
  106982291377056["main.BaseModel"]
  129768776280576["builtins.object"]
  106982291377056 --> 106982418154656
  129768776280576 --> 106982291377056

🛈 DocStrings

Bases: BaseModel

A sign-in for T3 Code's native surface: its WebSocket RPC and REST API.

That surface is what the web, desktop and mobile clients use. It streams a thread's events as they happen and can answer approvals, which /mcp cannot. It rejects MCP tokens, and /mcp rejects this one, so a client that uses both holds two sign-ins. Obtained by exchanging a one-time pairing token (t3 auth pairing create, or Settings -> Sharing & access) at /oauth/token.

Source code in src/pyt3client/models/auth.py
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
class T3NativeCredentials(BaseModel):
    """A sign-in for T3 Code's native surface: its WebSocket RPC and REST API.

    That surface is what the web, desktop and mobile clients use. It streams a
    thread's events as they happen and can answer approvals, which `/mcp` cannot.
    It rejects MCP tokens, and `/mcp` rejects this one, so a client that uses
    both holds two sign-ins. Obtained by exchanging a one-time pairing token
    (`t3 auth pairing create`, or Settings -> Sharing & access) at `/oauth/token`.
    """

    base_url: str
    """Environment origin without a trailing slash."""
    access_token: SecretStr
    expires_at: datetime
    scopes: tuple[str, ...]

base_url instance-attribute

base_url: str

Environment origin without a trailing slash.

:fa-brands-github: Show source on GitHub