ClaudeCode.Session.AccountInfo (ClaudeCode v0.36.3)

View Source

Information about the authenticated user's account.

Returned as part of the initialization response from the CLI.

Fields

  • :email - Account email address
  • :organization - Organization name
  • :subscription_type - Subscription type (e.g., "pro", "team")
  • :token_source - Source of the authentication token
  • :api_key_source - Source of the API key (e.g., "user", "project", "org")

Summary

Functions

Creates an AccountInfo from a JSON map.

Types

t()

@type t() :: %ClaudeCode.Session.AccountInfo{
  api_key_source: String.t() | nil,
  email: String.t() | nil,
  organization: String.t() | nil,
  subscription_type: String.t() | nil,
  token_source: String.t() | nil
}

Functions

new(data)

@spec new(map()) :: t()

Creates an AccountInfo from a JSON map.

Examples

iex> ClaudeCode.Session.AccountInfo.new(%{"email" => "user@example.com", "subscriptionType" => "pro"})
%ClaudeCode.Session.AccountInfo{email: "user@example.com", subscription_type: "pro"}