User
    
    
      
    
    
      
      透過集合功能整理內容
    
    
      
      你可以依據偏好儲存及分類內容。
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
    
    
    
      
      
        Google Chat 中的使用者。以要求的輸出內容傳回時,如果 Chat 應用程式是以使用者的身分進行驗證,則 User 資源的輸出內容只會填入使用者的 name 和 type。
      
      
        
          
            
              | JSON 表示法 | 
            
          
          
            
              {
  "name": string,
  "displayName": string,
  "domainId": string,
  "type": enum (Type),
  "isAnonymous": boolean
} | 
            
          
        
      
      
        
          
            
            
          
          
            
              | 欄位 | 
            
          
          
            
              name | 
              
                 string 
                Google Chat user 的資源名稱。 格式:users/{user}。users/app 可做為發出呼叫的應用程式 bot 使用者的別名。 如果是 human users,{user} 與使用者 ID 相同: 
                
                  People API 中 Person 的 id。舉例來說,Chat API 中的 users/123456789 代表 People API 中的 123456789 使用者個人資料 ID。  
                  Admin SDK Directory API 中使用者的 id。  
                  使用者的電子郵件地址可做為 API 要求中 {user} 的別名。舉例來說,如果 user@example.com 的 People API 個人資料 ID 是 123456789,您就可以使用 users/user@example.com 做為參照 users/123456789 的別名。API 只會傳回標準資源名稱 (例如 users/123456789)。  
                 
               | 
            
            
              displayName | 
              
                 string 
                僅供輸出。使用者的顯示名稱。 
               | 
            
            
              domainId | 
              
                 string 
                使用者 Google Workspace 網域的專屬 ID。 
               | 
            
            
              type | 
              
                 enum (Type) 
                使用者類型。 
               | 
            
            
              isAnonymous | 
              
                 boolean 
                僅供輸出。設為 true 後,系統會刪除使用者或無法查看其個人資料。 
               | 
            
          
        
      
      
        類型
        
        
          
            
              
              
            
            
              
                | 列舉 | 
              
            
            
              
                TYPE_UNSPECIFIED | 
                列舉的預設值。請勿使用。 | 
              
              
                HUMAN | 
                人類使用者。 | 
              
              
                BOT | 
                Chat 應用程式使用者。 | 
              
            
          
        
      
    
  
  
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
  上次更新時間:2025-07-25 (世界標準時間)。
  
  
  
    
      [null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],["The JSON representation defines a user with fields including `name` (resource identifier), `displayName` (user's name), `domainId` (Google Workspace domain), `type` (user or bot), and `isAnonymous` (deleted/hidden profile status). The `name` field uses aliases like email or People API ID. User types include `HUMAN` and `BOT`. Authenticated Chat app users only show `name` and `type` in request outputs. `type` is an enum with possible values like `HUMAN` and `BOT`.\n"]]