> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# Get Chat

- Component: `appmixer.telegram.core.GetChat`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.telegram 1.1.2](https://connectors.appmixer.com/connector/appmixer.telegram/1.1.2.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.telegram/1.1.2/component/appmixer.telegram.core.GetChat>

Retrieves up-to-date information about a chat: title, type, description, invite link, default member permissions and photo.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Chat ID (`chatId`) | text | Numeric chat ID (for example _-1002345678901_ for a group or channel) or a public _@channelusername_. The bot must be a member of the chat. Chat IDs are emitted by the New Message trigger. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| Chat ID (`id`) | integer | - |
| Chat Type (`type`) | string | - |
| Title (`title`) | string | - |
| Username (`username`) | string | - |
| First Name (`first_name`) | string | - |
| Last Name (`last_name`) | string | - |
| Bio (`bio`) | string | - |
| Description (`description`) | string | - |
| Invite Link (`invite_link`) | string | - |
| Permissions (`permissions`) | object | - |
| Chat Photo (`photo`) | object | - |
| Accent Color ID (`accent_color_id`) | integer | - |
| Max Reaction Count (`max_reaction_count`) | integer | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.telegram.core.GetChat",
  "label": "Get Chat",
  "description": "Retrieves up-to-date information about a chat: title, type, description, invite link, default member permissions and photo.",
  "author": "Appmixer <info@appmixer.com>",
  "version": "1.0.0",
  "auth": {
    "service": "appmixer:telegram"
  },
  "quota": {
    "manager": "appmixer:telegram",
    "resources": "requests",
    "scope": {
      "userId": "{{userId}}"
    }
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "chatId": {
            "type": "string"
          }
        },
        "required": [
          "chatId"
        ]
      },
      "inspector": {
        "inputs": {
          "chatId": {
            "type": "text",
            "index": 1,
            "label": "Chat ID",
            "tooltip": "Numeric chat ID (for example <i>-1002345678901</i> for a group or channel) or a public <i>@channelusername</i>. The bot must be a member of the chat. Chat IDs are emitted by the New Message trigger."
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "schema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "title": "Chat ID",
            "example": -1002345678901
          },
          "type": {
            "type": "string",
            "title": "Chat Type",
            "example": "supergroup"
          },
          "title": {
            "type": "string",
            "title": "Title",
            "example": "Product Team"
          },
          "username": {
            "type": "string",
            "title": "Username",
            "example": "product_team"
          },
          "first_name": {
            "type": "string",
            "title": "First Name",
            "example": "Jana"
          },
          "last_name": {
            "type": "string",
            "title": "Last Name",
            "example": "Novakova"
          },
          "bio": {
            "type": "string",
            "title": "Bio",
            "example": "Automation tester"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "example": "Internal coordination group."
          },
          "invite_link": {
            "type": "string",
            "title": "Invite Link",
            "example": "https://t.me/+AbCdEfGhIjK"
          },
          "permissions": {
            "type": "object",
            "title": "Permissions",
            "properties": {
              "can_send_messages": {
                "type": "boolean",
                "title": "Permissions.Can Send Messages"
              },
              "can_send_photos": {
                "type": "boolean",
                "title": "Permissions.Can Send Photos"
              },
              "can_invite_users": {
                "type": "boolean",
                "title": "Permissions.Can Invite Users"
              }
            },
            "example": {
              "can_send_messages": true,
              "can_send_photos": true,
              "can_invite_users": true
            }
          },
          "photo": {
            "type": "object",
            "title": "Chat Photo",
            "properties": {
              "small_file_id": {
                "type": "string",
                "title": "Chat Photo.Small File ID"
              },
              "big_file_id": {
                "type": "string",
                "title": "Chat Photo.Big File ID"
              }
            },
            "example": {
              "small_file_id": "AQADAgAT-akxG9c",
              "big_file_id": "AQADAgAU-akxG9c"
            },
            "required": [
              "small_file_id",
              "big_file_id"
            ]
          },
          "accent_color_id": {
            "type": "integer",
            "title": "Accent Color ID",
            "example": 3
          },
          "max_reaction_count": {
            "type": "integer",
            "title": "Max Reaction Count",
            "example": 11
          }
        },
        "required": [
          "id",
          "type",
          "accent_color_id",
          "max_reaction_count"
        ]
      }
    }
  ],
  "icon": "(data URI omitted)"
}
```
