Get OAuth Session Metadata
Return non-sensitive metadata about a stored OAuth session, if any.
Never exposes the access/refresh tokens themselves - only whether a session is connected, the bound account email, granted scope, and expiry, for display in the deployment's connection status UI.
Args: deployment_id: Deployment the entry belongs to. entry_id: Bundle entry (MCP) whose OAuth session to inspect. session: Database session. context: Caller's security context; the caller must own the deployment.
Returns:
Session metadata, or connected=False if no session exists yet.
Authorization
OAuth2AuthorizationCodeBearer AuthorizationBearer <token>
In: header
Path Parameters
deployment_id*Deployment Id
Format
uuidentry_id*Entry Id
Format
uuidQuery Parameters
verify_locally?Verify Locally
Default
trueResponse Body
application/json
application/json
curl -X GET "https://example.com/v1/oauth2/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/497f6eca-6276-4993-bfeb-53cbbbba6f08"{ "entry_id": "31513983-613b-4481-b270-ae929f358bae", "email": "string", "scope": "string", "expires_at": "2019-08-24T14:15:22Z", "connected": true}{ "detail": [ { "loc": [ "string" ], "msg": "string", "type": "string" } ]}