> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryvox.co/llms.txt
> Use this file to discover all available pages before exploring further.

# 라인 채널

> 라인 채널을 API로 만들 때 넣는 값, 쓸 수 있는 작업, 응답 필드를 볼 수 있어요.

`channel`이 `line`인 채널의 API 계약이에요. 연결 절차는 [라인 연결과 운영](https://docs.tryvox.co/docs/operate/deploy/integrations/line/overview.md)에 있어요.

## 생성 요청

[채널 생성](https://docs.tryvox.co/api-reference/v3/chat-channels/채널-생성.md)의 `params`에 아래 값을 넣어요. `name`, `agent` 같은 공통 필드는 채널 생성 페이지에 있어요.

| 필드 | 타입 | 필수 | 설명 |
| - | - | - | - |
| `channel_id` | string | 필수 | 라인 Messaging API의 Channel ID입니다. |
| `channel_secret` | string | 필수 | 라인 Channel secret입니다. 자격을 확인한 뒤 암호화해 저장하며 응답에 반환하지 않습니다. |

```json 요청 theme={null}
{
  "channel": "line",
  "name": "고객지원 라인",
  "agent": {
    "agent_id": "44444444-4444-4444-8444-444444444444",
    "agent_version": "production"
  },
  "params": {
    "channel_id": "2000000000",
    "channel_secret": "EXAMPLE_LINE_CHANNEL_SECRET"
  }
}
```

```json 201 응답 theme={null}
{
  "chat_channel": {
    "id": "66666666-6666-4666-8666-666666666666",
    "organization_id": "55555555-5555-4555-8555-555555555555",
    "status": "disabled",
    "status_detail": null,
    "operation_enabled": false,
    "name": "고객지원 라인",
    "display_name": "고객지원 라인",
    "agent": {
      "agent_id": "44444444-4444-4444-8444-444444444444",
      "agent_version": "production"
    },
    "initial_responder_type": "agent",
    "created_at": 1794351600000,
    "updated_at": 1794351600000,
    "allow_agent_response": true,
    "channel": "line",
    "details": {
      "last_received_at": null,
      "last_error_code": null,
      "last_error": null,
      "channel_id": "2000000000",
      "bot_basic_id": "@000example",
      "bot_display_name": "vox.ai 고객지원",
      "webhook_url": "https://client-api.tryvox.co/line/9a9a9a9a-0000-4000-8000-000000000002/events",
      "verified_at": 1794351600000
    }
  },
  "verification": null
}
```

## 쓸 수 있는 작업

* [채널 생성](https://docs.tryvox.co/api-reference/v3/chat-channels/채널-생성.md)
* [채널 목록 조회](https://docs.tryvox.co/api-reference/v3/chat-channels/채널-목록-조회.md)
* [채널 조회](https://docs.tryvox.co/api-reference/v3/chat-channels/채널-조회.md)
* [채널 수정](https://docs.tryvox.co/api-reference/v3/chat-channels/채널-수정.md)
* [채널 인증 신청](https://docs.tryvox.co/api-reference/v3/chat-channels/채널-인증-신청.md)
* [채널 활성화](https://docs.tryvox.co/api-reference/v3/chat-channels/채널-활성화.md)
* [채널 비활성화](https://docs.tryvox.co/api-reference/v3/chat-channels/채널-비활성화.md)
* [채널 연결 해제](https://docs.tryvox.co/api-reference/v3/chat-channels/채널-연결-해제.md)

라인 채널에는 채널 삭제, 채널 재연결을 쓸 수 없어요.

## 수정할 수 있는 값

[채널 수정](https://docs.tryvox.co/api-reference/v3/chat-channels/채널-수정.md)의 `params`에 아래 값을 넣어요. 보내지 않은 값은 그대로예요.

| 필드 | 타입 | 설명 |
| - | - | - |
| `channel_secret` | string \| null | 새 라인 Channel secret입니다. 자격을 확인한 뒤 암호화해 저장하며 응답에 반환하지 않습니다. |

## 응답의 `details`

[채널 조회](https://docs.tryvox.co/api-reference/v3/chat-channels/채널-조회.md) 응답의 `details`에 아래 값이 있어요.

| 필드 | 타입 | 설명 |
| - | - | - |
| `last_received_at` | integer \| null | 이 채널로 고객 메시지를 마지막으로 받은 시각입니다(unix ms). 받은 적이 없으면 null입니다. |
| `last_error_code` | string \| null | 지원 종료 예정입니다. `last_error.code`와 같은 값이므로 `last_error`를 쓰세요. 최근 연결·운영 오류 코드이며, 없으면 null입니다. |
| `last_error` | LastError \| null | 최근 연결·운영 오류입니다. 없으면 null입니다. 모든 채널이 같은 구조로 반환합니다. `message`는 카카오만 채우고 다른 채널은 null입니다. |
| `channel_id` | string | 라인 Messaging API의 Channel ID입니다. |
| `bot_basic_id` | string \| null | 라인 공식 계정 Basic ID입니다(`@`로 시작). |
| `bot_display_name` | string \| null | 라인 공식 계정의 봇 이름입니다. 채널 이름(`name`)과는 따로 둡니다. |
| `webhook_url` | string | 공급자 화면에 넣는 전체 웹훅 주소입니다. `https://client-api.tryvox.co`로 시작합니다. |
| `verified_at` | integer \| null | 마지막으로 자격 확인에 성공한 시각입니다(unix ms). 웹훅이 도달했는지를 뜻하지는 않습니다. |

## 받는 메시지

글자만 읽어요. 읽지 않는 메시지의 처리는 [라인 연결과 운영](https://docs.tryvox.co/docs/operate/deploy/integrations/line/overview.md#지원하는-메시지)에 있어요.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.