### Client Authentication Header Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Example of request headers for Client authentication, including Client-Id and Client-Secret. ```http Client-Id: fefb6bbb-00c2-497c-afc2-XXXXXXXXXXXX Client-Secret: VeIMuc9XGle7PSxIVYNwPpI2OEk_9gXoW_XXXXXXXXX ``` -------------------------------- ### GET /open/v1/lives/setting Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Retrieves the broadcast settings for the streaming channel. This operation requires user authentication with an Access Token. ```APIDOC ## GET /open/v1/lives/setting ### Description Retrieves the broadcast settings for the streaming channel. This operation requires user authentication. ### Method GET ### Endpoint /open/v1/lives/setting ### Response #### Success Response (200) - **defaultLiveTitle** (String) - The default title for the live stream. - **category** (Object) - The live stream category details. - **categoryType** (String) - The type of category (e.g., GAME, SPORTS, ETC). - **categoryId** (String) - The identifier for the category. - **categoryValue** (String) - The name of the category. - **posterImageUrl** (String) - The URL of the category's poster image. - **tags** (String[]) - A list of tags associated with the live stream. #### Response Example { "defaultLiveTitle": "My Stream Title", "category": { "categoryType": "GAME", "categoryId": "RPG", "categoryValue": "Role-Playing Game", "posterImageUrl": "http://example.com/poster.jpg" }, "tags": ["rpg", "adventure"] } ``` -------------------------------- ### GET /open/v1/channels Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Retrieves information for specified channels. Requires client authentication. Supports querying up to 20 channel IDs. ```APIDOC ## GET /open/v1/channels ### Description Retrieves information for specified channels. Requires client authentication. Supports querying up to 20 channel IDs. ### Method GET ### Endpoint /open/v1/channels ### Parameters #### Query Parameters - **channelIds** (String[]) - Required - List of channel IDs to query. Maximum of 20 IDs can be requested. ### Response #### Success Response (200) - **data** (Object[]) - List of requested channel information. If no matching channels are found, no results are returned. - **channelId** (String) - Channel identifier - **channelName** (String) - Channel name - **channelImageUrl** (String) - Channel image URL - **followerCount** (Int) - Number of followers for the channel - **verifiedMark** (Boolean) - Whether the channel has a verified mark ``` -------------------------------- ### GET /open/v1/sessions Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Retrieves a list of user sessions. Disconnected sessions are available for 90 days. ```APIDOC ## GET /open/v1/sessions ### Description Retrieves a list of user sessions. Disconnected sessions are available for 90 days. ### Method GET ### Endpoint /open/v1/sessions ### Parameters #### Query Parameters - **size** (Int) - Optional - The number of sessions to retrieve. Minimum 1, maximum 50. Defaults to 20. - **page** (String) - Optional - The page number to retrieve. Starts from 0. Defaults to 0. ### Response #### Success Response (200) - **data** (Object[]) - A list of session objects. - **sessionKey** (String) - The session identifier. - **connectedDate** (String) - The connection timestamp. - **disconnectedDate** (String) - The disconnection timestamp. - **subscribedEvents** (Object[]) - A list of subscribed events. - **eventType** (String) - The type of event. Possible values: CHAT, DONATION, SUBSCRIPTION. - **channelId** (String) - The channel ID for the event (channel identifier). #### Response Example { "data": [ { "sessionKey": "string", "connectedDate": "string", "disconnectedDate": "string", "subscribedEvents": [ { "eventType": "CHAT", "channelId": "string" } ] } ] } ``` -------------------------------- ### GET /open/v1/chats/settings Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Retrieves the current chat settings for a channel. This includes conditions for chat availability and participation. ```APIDOC ## GET /open/v1/chats/settings ### Description Retrieves the current chat settings for a channel, including conditions for chat availability and participation. ### Method GET ### Endpoint /open/v1/chats/settings ### Response #### Success Response (200) - **chatAvailableCondition** (String) - Condition for identity verification (NONE: unrestricted, REAL_NAME: only for viewers with Naver identity verification). - **chatAvailableGroup** (String) - Condition for chat participation scope (ALL: all viewers, FOLLOWER: followers only, MANAGER: moderators only, SUBSCRIBER: subscribers only). - **minFollowerMinute** (Int) - Minimum following period condition applied when FOLLOWER mode is set. - **allowSubscriberInFollowerMode** (boolean) - Whether to allow subscribers to be excluded from the minimum following period condition when FOLLOWER mode is set. - **chatSlowModeSec** (Integer) - Chat transmission interval for viewers in seconds. - **chatEmojiMode** (Boolean) - Whether emoji mode is enabled. #### Response Example { "chatAvailableCondition": "NONE", "chatAvailableGroup": "ALL", "minFollowerMinute": 0, "allowSubscriberInFollowerMode": false, "chatSlowModeSec": 0, "chatEmojiMode": false } ``` -------------------------------- ### Get Application ID and Name Source: https://chzzk.gitbook.io/chzzk/chzzk-api/tips Retrieve the application ID and name for your Chzzk integration. This is a foundational step for many API interactions. ```javascript const appId = "YOUR_APP_ID"; const appName = "Your App Name"; ``` -------------------------------- ### Chzzk Drops Reward Claims API Response Example Source: https://chzzk.gitbook.io/chzzk/llms-full.txt This JSON object demonstrates a typical response from the Chzzk Drops Reward Claims API, showing details of claimed and fulfilled rewards. ```json { "data": [ { "claimId": "1ce167db-8c58-4a37-8662-48d4e2398503", "campaignId": "bb3a5e21-b18a-4b31-851b-adbecd7dfae5", "rewardId": "068598a1-36b2-4bb4-ab8b-dd875e621862", "categoryId": "CATEGORY_CHZZK", "categoryName": "치지직", "channelId": "34d7ff19-1b63-4b32-85fb-d44880195533", "fulfillmentState": "CLAIMED", "claimedDate": "2024-08-01T09:20:26Z", "updatedDate": "2024-08-01T09:20:26Z" }, { "claimId": "6dd13087-d811-479d-8c4d-52d9f3a54c24", "campaignId": "bb3a5e21-b18a-4b31-851b-adbecd7dfae5", "rewardId": "13708b6d-e0ba-4180-982b-f16aa3521d15", "categoryId": "CATEGORY_CHZZK", "categoryName": "치지직", "channelId": "34d7ff19-1b63-4b32-85fb-d44880195533", "fulfillmentState": "FULFILLED", "claimedDate": "2024-08-01T09:21:26Z", "updatedDate": "2024-08-01T09:22:26Z" }, { "claimId": "477fe295-30c2-4670-a3a6-6ad8305d36ad", "campaignId": "bb3a5e21-b18a-4b31-851b-adbecd7dfae5", "rewardId": "13708b6d-e0ba-4180-982b-f16aa3521d15", "categoryId": "CATEGORY_CHZZK", "categoryName": "치지직", "channelId": "991cd681-527d-43e5-9758-adae7905a005", "fulfillmentState": "FULFILLED", "claimedDate": "2024-08-01T09:22:26Z", "updatedDate": "2024-08-01T09:23:26Z" } ], "page": { "cursor": "2af178e3-a620-43da-b4b6-90fe11fa0737" } } ``` -------------------------------- ### GET /open/v1/restrict-channels Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Retrieves a list of restricted users for a channel. Requires '활동제한 조회' scope. ```APIDOC ## GET /open/v1/restrict-channels ### Description Retrieves the list of users currently under restriction for a channel. ### Method GET ### Endpoint /open/v1/restrict-channels ### Parameters #### Query Parameters - **size** (Integer) - Optional - The number of items to retrieve (default: 30, max: 30). - **next** (String) - Optional - The value to use for next page pagination. ### Response #### Success Response (200) - **restrictedChannelId** (String) - The channelId of the restricted user. - **restrictedChannelName** (String) - The name of the restricted channel. - **createdDate** (Date) - The date the restriction was applied. - **releaseDate** (Date) - The date the restriction is scheduled to be released. #### Response Example (No specific example provided in source) ``` -------------------------------- ### Access Token Authentication Header Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Example of the Authorization header format for API calls requiring Access Token authentication. Ensure 'Bearer' is followed by a space and the token. ```http Authorization: Bearer FFok65zQFQVcFvH2eJ7SS7SBFlTXt0EZ10L5XXXXXXXX ``` -------------------------------- ### GET /open/v1/streams/key Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Retrieves the stream key for the streaming channel. This operation requires user authentication with an Access Token. ```APIDOC ## GET /open/v1/streams/key ### Description Retrieves the stream key for the streaming channel. This operation requires user authentication. ### Method GET ### Endpoint /open/v1/streams/key ### Response #### Success Response (200) - **streamKey** (String) - The stream key value. #### Response Example { "streamKey": "your_secret_stream_key" } ``` -------------------------------- ### GET /open/v1/sessions/client Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Retrieves a list of sessions created based on client authentication. Disconnected sessions are available for retrieval for up to 90 days. Client authentication is required to call this API. ```APIDOC ## GET /open/v1/sessions/client ### Description Retrieves a list of sessions created based on client authentication. Disconnected sessions are available for retrieval for up to 90 days. ### Method GET ### Endpoint /open/v1/sessions/client ### Parameters #### Query Parameters - **size** (Int) - Optional - The number of sessions to retrieve. Minimum 1, maximum 50. Defaults to 20. - **page** (String) - Optional - The page to retrieve. Starts from 0. Defaults to 0. ### Response #### Success Response (200) - **data** (Object[]) - Session list results. - **sessionKey** (String) - Session identifier. - **connectedDate** (String) - Connection time. - **disconnectedDate** (String) - Disconnection time. - **subscribedEvents** (Object[]) - List of subscribed events. - **eventType** (String) - Type of event. Possible values: CHAT, DONATION, SUBSCRIPTION. - **channelId** (String) - Event channel ID (channel identifier). ``` -------------------------------- ### GET /open/v1/channels/streaming-roles Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Retrieves a list of channel managers and their roles. This operation requires authentication with an Access Token obtained via user account authentication. ```APIDOC ## GET /open/v1/channels/streaming-roles ### Description Retrieves a list of channel managers and their roles. This operation requires authentication with an Access Token obtained via user account authentication. ### Method GET ### Endpoint /open/v1/channels/streaming-roles ### Response #### Success Response (200) - **data** (Object[]) - List of channel managers. - **managerChannelId** (String) - Manager channel identifier - **managerChannelName** (String) - Manager channel name - **userRole** (String) - Manager role. Possible values: STREAMING_CHANNEL_OWNER, STREAMING_CHANNEL_MANAGER, STREAMING_CHAT_MANAGER, STREAMING_SETTLEMENT_MANAGER. - **createdDate** (Date) - Creation date ``` -------------------------------- ### GET /open/v1/channels/subscribers Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Retrieves a list of subscribers for a given channel. This operation requires authentication with an Access Token obtained via user account authentication. Supports pagination and sorting. ```APIDOC ## GET /open/v1/channels/subscribers ### Description Retrieves a list of subscribers for a given channel. This operation requires authentication with an Access Token obtained via user account authentication. Supports pagination and sorting. ### Method GET ### Endpoint /open/v1/channels/subscribers ### Parameters #### Query Parameters - **page** (Int) - Optional - The requested page, starting from 0. Default value: 0. - **size** (Int) - Optional - The number of categories to retrieve. Minimum 1, maximum 50. Default value: 30. - **sort** (String) - Optional - Sorting method. Possible values: RECENT (most recent subscriptions), LONGER (by subscription duration). ### Response #### Success Response (200) - **data** (Object[]) - List of subscribers for the requested channel. - **channelId** (String) - Subscriber channel identifier - **channelName** (String) - Subscriber channel name - **month** (Int) - Number of months subscribed - **tierNo** (Int) - Subscription tier. Possible values: 1 (Tier 1 subscription), 2 (Tier 2 subscription). - **createdDate** (Date) - Date of subscription ``` -------------------------------- ### GET /open/v1/channels/followers Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Retrieves a list of followers for a given channel. This operation requires authentication with an Access Token obtained via user account authentication. Supports pagination. ```APIDOC ## GET /open/v1/channels/followers ### Description Retrieves a list of followers for a given channel. This operation requires authentication with an Access Token obtained via user account authentication. Supports pagination. ### Method GET ### Endpoint /open/v1/channels/followers ### Parameters #### Query Parameters - **page** (Int) - Optional - The requested page, starting from 0. Default value: 0. - **size** (Int) - Optional - The number of categories to retrieve. Minimum 1, maximum 50. Default value: 30. ### Response #### Success Response (200) - **data** (Object[]) - List of followers for the requested channel. - **channelId** (String) - Follower channel identifier - **channelName** (String) - Follower channel name - **createdDate** (Date) - Date of follow ``` -------------------------------- ### Get User Information Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Retrieves the channel information for the logged-in user. Every user in Chzzik owns a channel, and the channel ID can be used as the user's unique identifier. ```APIDOC ## GET /open/v1/users/me ### Description Retrieves the channel information for the logged-in user. ### Method GET ### Endpoint /open/v1/users/me ### Response #### Success Response (200) - **channelId** (String) - The unique identifier for the user's channel. - **channelName** (String) - The name of the user's channel. ### Response Example { "channelId": "909501f048b44cf0d5c1d28XXXXXXXX", "channelName": "치지직유저 3121" } ``` -------------------------------- ### GET /open/v1/lives Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Retrieves a list of currently ongoing live streams. This API requires client authentication and can be used to fetch live streams sorted by viewer count. ```APIDOC ## GET /open/v1/lives ### Description Retrieves a list of currently ongoing live streams, sorted by viewer count in descending order. ### Method GET ### Endpoint /open/v1/lives ### Parameters #### Query Parameters - **size** (Int) - Optional - The number of live streams to retrieve. Minimum 1, maximum 20. Defaults to 20. - **next** (String) - Optional - A value used to call the next list of items. Can be obtained from the 'page.next' value in the API response. ### Response #### Success Response (200) - **data** (Object[]) - An array of live stream objects. - **liveId** (Int) - The unique identifier for the live stream. - **liveTitle** (String) - The title of the live stream. - **liveThumbnailImageUrl** (String) - The URL of the thumbnail image for the live stream. - **concurrentUserCount** (Int) - The current number of concurrent viewers. - **openDate** (String) - The start time of the live stream. - **adult** (boolean) - Indicates if age restriction is applied. - **tags** (String[]) - A list of tags associated with the live stream. - **categoryType** (String) - The type of category (e.g., GAME, SPORTS, ETC). - **liveCategory** (String) - The identifier for the live stream category. - **liveCategoryValue** (String) - The name of the live stream category. - **channelId** (String) - The channel ID (channel identifier). - **channelName** (String) - The name of the channel. - **channelImageUrl** (String) - The URL of the channel's image. - **page** (Object) - Pagination information. - **next** (String) - The value to use for fetching the next page of results. #### Response Example { "data": [ { "liveId": 12345, "liveTitle": "My Awesome Stream", "liveThumbnailImageUrl": "http://example.com/thumb.jpg", "concurrentUserCount": 1500, "openDate": "2023-10-27T10:00:00Z", "adult": false, "tags": ["gaming", "fun"], "categoryType": "GAME", "liveCategory": "FPS", "liveCategoryValue": "First-Person Shooter", "channelId": "channel123", "channelName": "AwesomeGamer", "channelImageUrl": "http://example.com/channel.jpg" } ], "page": { "next": "some_next_token" } } ``` -------------------------------- ### Notification Message JSON Structure Source: https://chzzk.gitbook.io/chzzk/llms-full.txt This is an example of the JSON structure for a notification message received via webhook. It includes details about the event and the subscription. ```json { "message": { "messageId": "eafe79192ab427be4e85e5a825c980af", "version": "1", "event": { "eventTimeMillis": 1722477515159, "version": "1", "eventType": "drop_reward_claim", "data": { "dropsClaimId": "97", "channelId": "${channelId}", "dropsRewardId": "2", "dropsCampaignId": "c91f66d879fb96e39d2f44e0d6094e8a", "dropsCategoryId": "CATEGORY_CHZZK", "dropsCategoryName": "치지직", "dropsClaimDate": "2024-08-01T01:58:33Z" } } }, "subscription": { "clientId": "${clientId}", "status": "ENABLED", "method": { "methodType": "WEBHOOK", "url": "${Webhook URL}" } } } ``` -------------------------------- ### GET /open/v1/drops/reward-claims Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Retrieves drops reward claims. This endpoint supports filtering by claim ID, channel ID, campaign ID, category ID, and fulfillment state, as well as pagination. ```APIDOC ## GET /open/v1/drops/reward-claims ### Description Retrieves drops reward claims. This endpoint supports filtering by claim ID, channel ID, campaign ID, category ID, and fulfillment state, as well as pagination. ### Method GET ### Endpoint /open/v1/drops/reward-claims ### Parameters #### Query Parameters - **page** (Object) - Optional - Used for paginated retrieval. - **from** (String) - Optional - Identifier for the start of the retrieval range when paginating. - **size** (Int) - Optional - Total size to retrieve when paginating. Defaults to 20. - **claimId** (String) - Optional - The claim ID to retrieve. Can be a comma-separated array of up to 100 IDs. - **channelId** (String) - Optional - The channel ID of the user to retrieve. - **campaignId or categoryId** (String) - Optional - Used as a condition to retrieve by a specific campaign and category. Cannot use both conditions simultaneously. - **campaignId**: The ID of the drops campaign to retrieve. - **categoryId**: The ID of the broadcast (game) category to retrieve, based on the Chzzk category. - **fulfillmentState** (String) - Optional - The reward status condition to retrieve. If not specified, all statuses are retrieved. - `CLAIMED`: Reward claimed. - `FULFILLED`: Fulfillment complete. ### Response #### Success Response (200) - **data** (Object[]) - Response information object array. An empty array may be returned if there are no retrieval results. - **claimId** (String) - Drops campaign claim ID. - **campaignId** (String) - Drops campaign ID. - **rewardId** (String) - Reward ID included in the drops campaign. - **categoryId** (String) - Category ID assigned to the drops campaign. - **categoryName** (String) - Displayable category name assigned to the drops campaign. - **channelId** (String) - Chzzk channel ID of the user. - **fulfillmentState** (String) - Reward status condition. - `CLAIMED`: Reward claimed. - `FULFILLED`: Fulfillment complete. - **claimedDate** (String) - The time the reward was last claimed. RFC3339 format UTC time. - **updatedDate** (String) - The time the `fulfillmentState` was last changed. RFC3339 format UTC time. - **page** (Object) - Used for paginated retrieval. - **cursor** (String) - Optional - When paginating, used as `page.from` for the next retrieval. May be null or an empty string if the `claimId` item in Request Param is defined. ### Request Example ```json { "data": [ { "claimId": "1ce167db-8c58-4a37-8662-48d4e2398503", "campaignId": "bb3a5e21-b18a-4b31-851b-adbecd7dfae5", "rewardId": "068598a1-36b2-4bb4-ab8b-dd875e621862", "categoryId": "CATEGORY_CHZZK", "categoryName": "치지직", "channelId": "34d7ff19-1b63-4b32-85fb-d44880195533", "fulfillmentState": "CLAIMED", "claimedDate": "2024-08-01T09:20:26Z", "updatedDate": "2024-08-01T09:20:26Z" }, { "claimId": "6dd13087-d811-479d-8c4d-52d9f3a54c24", "campaignId": "bb3a5e21-b18a-4b31-851b-adbecd7dfae5", "rewardId": "13708b6d-e0ba-4180-982b-f16aa3521d15", "categoryId": "CATEGORY_CHZZK", "categoryName": "치지직", "channelId": "34d7ff19-1b63-4b32-85fb-d44880195533", "fulfillmentState": "FULFILLED", "claimedDate": "2024-08-01T09:21:26Z", "updatedDate": "2024-08-01T09:22:26Z" }, { "claimId": "477fe295-30c2-4670-a3a6-6ad8305d36ad", "campaignId": "bb3a5e21-b18a-4b31-851b-adbecd7dfae5", "rewardId": "13708b6d-e0ba-4180-982b-f16aa3521d15", "categoryId": "CATEGORY_CHZZK", "categoryName": "치지직", "channelId": "991cd681-527d-43e5-9758-adae7905a005", "fulfillmentState": "FULFILLED", "claimedDate": "2024-08-01T09:22:26Z", "updatedDate": "2024-08-01T09:23:26Z" } ], "page": { "cursor": "2af178e3-a620-43da-b4b6-90fe11fa0737" } } ``` ### Response Example ```json { "data": [ { "claimId": "1ce167db-8c58-4a37-8662-48d4e2398503", "campaignId": "bb3a5e21-b18a-4b31-851b-adbecd7dfae5", "rewardId": "068598a1-36b2-4bb4-ab8b-dd875e621862", "categoryId": "CATEGORY_CHZZK", "categoryName": "치지직", "channelId": "34d7ff19-1b63-4b32-85fb-d44880195533", "fulfillmentState": "CLAIMED", "claimedDate": "2024-08-01T09:20:26Z", "updatedDate": "2024-08-01T09:20:26Z" }, { "claimId": "6dd13087-d811-479d-8c4d-52d9f3a54c24", "campaignId": "bb3a5e21-b18a-4b31-851b-adbecd7dfae5", "rewardId": "13708b6d-e0ba-4180-982b-f16aa3521d15", "categoryId": "CATEGORY_CHZZK", "categoryName": "치지직", "channelId": "34d7ff19-1b63-4b32-85fb-d44880195533", "fulfillmentState": "FULFILLED", "claimedDate": "2024-08-01T09:21:26Z", "updatedDate": "2024-08-01T09:22:26Z" }, { "claimId": "477fe295-30c2-4670-a3a6-6ad8305d36ad", "campaignId": "bb3a5e21-b18a-4b31-851b-adbecd7dfae5", "rewardId": "13708b6d-e0ba-4180-982b-f16aa3521d15", "categoryId": "CATEGORY_CHZZK", "categoryName": "치지직", "channelId": "991cd681-527d-43e5-9758-adae7905a005", "fulfillmentState": "FULFILLED", "claimedDate": "2024-08-01T09:22:26Z", "updatedDate": "2024-08-01T09:23:26Z" } ], "page": { "cursor": "2af178e3-a620-43da-b4b6-90fe11fa0737" } } ``` ``` -------------------------------- ### Create Session (Client) Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Obtain a URL for socket connection using client authentication. This URL is valid for a limited time. Requires application registration and client authentication. ```HTTP GET /open/v1/sessions/auth/client ``` -------------------------------- ### Create Session (User) Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Request a URL for socket connection using Access Token authentication. The generated URL is time-limited. Users can only subscribe to events associated with their Access Token. ```HTTP GET /open/v1/sessions/auth ``` -------------------------------- ### Create Session (Client) Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Obtains a URL for socket connection using Client authentication. The generated URL is valid for a limited time. A maximum of 10 connections can be maintained. Requires application registration and Client authentication. ```APIDOC ## GET /open/v1/sessions/auth/client ### Description Obtains a URL for socket connection using Client authentication. ### Method GET ### Endpoint /open/v1/sessions/auth/client ### Response #### Success Response (200) - **url** (String) - The URL for socket connection. ``` -------------------------------- ### Create Session (User) Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Requests a URL for socket connection via Access Token authentication. The generated URL is valid for a limited time. Connected sessions can only subscribe to user events identical to the Access Token used for session creation. A maximum of 3 connections can be maintained per user. ```APIDOC ## GET /open/v1/sessions/auth ### Description Requests a URL for socket connection via Access Token authentication. ### Method GET ### Endpoint /open/v1/sessions/auth ### Response #### Success Response (200) - **url** (String) - The URL for socket connection. ``` -------------------------------- ### Open API Domain Configuration Source: https://chzzk.gitbook.io/chzzk/chzzk-api/tips Configure the Open API domain for your Chzzk application. Ensure this domain is correctly set up for API access. ```javascript const openApiDomain = "https://api.chzzk.naver.com"; ``` -------------------------------- ### Connect to Session using Socket.IO-client Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Connect to a session using the provided URL and options. Supports Socket.IO-client versions up to 2.0.3. Ensure the sessionURL is obtained via the API. ```javascript // api를 통해 얻은 연결 url const sessionURL = 'https://ssio08.nchat.naver.com:443?auth=TOKEN'; // 옵션 설정 const socketOption = { reconnection: false, 'force new connection': true, 'connect timeout': 3000, transports: ['websocket'], }; // ... // 세션 연결 socket = io.connect(sessionURL, socketOption) socket.on('connect', function() { // on connected }); ``` -------------------------------- ### POST /open/v1/sessions/events/subscribe/subscription Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Subscribes to a user's subscription events for the requested session. When a subscription occurs, a subscription event message is sent to the requested session. ```APIDOC ## POST /open/v1/sessions/events/subscribe/subscription ### Description Subscribes to a user's subscription events for the requested session. When a subscription occurs, a subscription event message is sent to the requested session. Upon successful subscription, a [message event subscribe message](#message-event-subscribe) will be delivered to the requested session. When subscribing to events, a [subscription event message](#message-event-subscribe-subscription) will be delivered when a subscription occurs on the subscribed channel. ### Method POST ### Endpoint /open/v1/sessions/events/subscribe/subscription ### Parameters #### Request Body - **sessionKey** (String) - Required - Session identifier ### Request Example { "sessionKey": "your_session_key" } ### Response #### Success Response (200) (No specific response fields documented in the source) #### Response Example (No example provided in the source) ``` -------------------------------- ### POST /open/v1/temporary-restrict-channels Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Adds a user to the temporary restriction list. Requires '활동제한 쓰기' scope. ```APIDOC ## POST /open/v1/temporary-restrict-channels ### Description Adds a user as a target for temporary restriction. ### Method POST ### Endpoint /open/v1/temporary-restrict-channels ### Parameters #### Request Body - **targetChannelId** (String) - Required - The channelId of the user to be temporarily restricted. - **chatChannelId** (String) - Required - The channelId for chat. ### Response #### Success Response (200) - **Success** - Indicates successful addition to the temporary restriction list. #### Error Response (400) - **Error** - Indicates that the user does not exist, is already temporarily restricted, or is an unregisterable account. #### Error Response (403) - **Error** - Indicates insufficient permissions. #### Response Example (No specific example provided in source) ``` -------------------------------- ### Receive System Events Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Listen for 'SYSTEM' events on the established socket connection. The 'data' object will contain information about the system event. ```javascript // eventType 메시지 socket.on("SYSTEM", function(data) { /* on system event */ }); ``` -------------------------------- ### POST /open/v1/restrict-channels Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Adds a user to the restriction list. Requires '활동제한 쓰기' scope. ```APIDOC ## POST /open/v1/restrict-channels ### Description Adds a user as a target for restriction. ### Method POST ### Endpoint /open/v1/restrict-channels ### Parameters #### Request Body - **targetChannelId** (String) - Required - The channelId of the user to be restricted. ### Response #### Success Response (200) - **Success** - Indicates successful addition to the restriction list. #### Response Example (No specific example provided in source) ``` -------------------------------- ### POST /open/v1/sessions/events/subscribe/chat Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Subscribes to user chat events for a given session. A confirmation message is sent to the session upon successful subscription. Chat events will trigger a message to the session. ```APIDOC ## POST /open/v1/sessions/events/subscribe/chat ### Description Subscribes to user chat events for a given session. A confirmation message is sent to the session upon successful subscription. Chat events will trigger a message to the session. ### Method POST ### Endpoint /open/v1/sessions/events/subscribe/chat ### Parameters #### Request Body - **sessionKey** (String) - Required - The session identifier. ### Request Example { "sessionKey": "string" } ### Response #### Success Response (200) (No specific response body details provided in the source for success) #### Response Example (No example provided in the source) ``` -------------------------------- ### POST /open/v1/sessions/events/unsubscribe/subscription Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Unsubscribes from a user's subscription events for the requested session. When an unsubscription occurs, an unsubscription event message is sent to the requested session. ```APIDOC ## POST /open/v1/sessions/events/unsubscribe/subscription ### Description Unsubscribes from a user's subscription events for the requested session. When an unsubscription occurs, an unsubscription event message will be delivered to the requested session. ### Method POST ### Endpoint /open/v1/sessions/events/unsubscribe/subscription ### Parameters #### Request Body - **sessionKey** (String) - Required - Session identifier ### Request Example { "sessionKey": "your_session_key" } ### Response #### Success Response (200) (No specific response fields documented in the source) #### Response Example (No example provided in the source) ``` -------------------------------- ### Partner Admin Account and Drops Permission Request Information Source: https://chzzk.gitbook.io/chzzk/llms-full.txt This information is required when requesting a partner admin account and Drops permission for campaign management. It includes details about existing admin access, game title, and application ID. ```text 1. 치지직 어드민 접근권한 (FRA 계정) 보유 여부 : Yes/No 로 입력해 주세요. - 1번 항목이 Yes 인 경우 필요한 추가 정보 1-1. 드롭스 관리에 사용할 Friend 어드민 계정 ID : FRAOOOOO 형식으로 입력해 주세요. 2. 연동 희망하는 게임 타이틀명 : 드롭스 캠페인을 진행하고자 하는 게임의 타이틀명을 치지직에 등록된 방송 카테고리명 기준으로 적어주세요. 복수로 신청하고자 하는 경우 쉼표(,)로 구분하여 적어주세요. 3. 연동할 치지직 개발자센터 애플리케이션 ID : 치지직 개발자 센터에 등록한 애플리케이션ID를 동일하게 입력해 주세요. - 1번 항목이 No 인 경우 필요한 추가 정보 1-2. 신청 담당자 성함(국문) 1-3. 신청 담당자 성함(영문) 1-4. 회사명(국문) 1-5. 회사명(영문) 1-6. 신청 담당자 이메일 1-7. 신청 담당자 전화번호 2. 연동 희망하는 게임 타이틀명 : 드롭스 캠페인을 진행하고자 하는 게임의 타이틀명을 치지직에 등록된 방송 카테고리명 기준으로 적어주세요. 복수로 신청하고자 하는 경우 쉼표(,)로 구분하여 적어주세요. 3. 연동할 치지직 개발자센터 애플리케이션 ID : 치지직 개발자 센터에 등록한 애플리케이션ID를 동일하게 입력해 주세요. ``` -------------------------------- ### Register Chat Notice Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Allows users to register chat notices using either new messages or existing message IDs. Requires '채팅 공지 쓰기' scope. ```APIDOC ## POST /open/v1/chats/notice ### Description Registers a chat notice. This can be done using a new message or an existing message ID. ### Method POST ### Endpoint /open/v1/chats/notice ### Request Header `Content-Type : application/json` ### Request Body - **message** (String) - Optional - The content of the new message to be used as a notice. Limited to 100 characters. - **messageId** (String) - Optional - The ID of an existing sent message to be used as a notice. ### Response #### Success Response (200) - Description: Notice registration successful. ### Request Example ```json { "message": "Important announcement!" } ``` ### Request Example (using messageId) ```json { "messageId": "msg_12345abcde" } ``` ``` -------------------------------- ### Client Authentication Source: https://chzzk.gitbook.io/chzzk/llms-full.txt APIs using Client authentication require 'Client-Id' and 'Client-Secret' in the request headers. ```APIDOC ## Client Authentication API ### Description This section outlines the request headers needed for APIs that utilize Client authentication. You must provide your Client ID and Client Secret. ### Method Not specified (assumed to be applicable to various HTTP methods) ### Endpoint Not specified ### Parameters #### Request Header - **Client-Id** (String) - Required - Example: `fefb6bbb-00c2-497c-afc2-XXXXXXXXXXXX` - **Client-Secret** (String) - Required - Example: `VeIMuc9XGle7PSxIVYNwPpI2OEk_9gXoW_XXXXXXXXX` - **Content-Type** (String) - Required - Example: `application/json` ``` -------------------------------- ### Open API Domain Source: https://chzzk.gitbook.io/chzzk/llms-full.txt The base domain for accessing the Chzzk Open API. ```text https://openapi.chzzk.naver.com ``` -------------------------------- ### POST /open/v1/sessions/events/subscribe/donation Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Subscribes to a user's donation events for the requested session. Upon completion of the subscription, an 'event subscribe message' is delivered to the requested session. When subscribing to events, a 'donation event message' is delivered when a donation occurs on the subscribed channel. ```APIDOC ## POST /open/v1/sessions/events/subscribe/donation ### Description Subscribes to a user's donation events for the requested session. Upon completion of the subscription, an 'event subscribe message' is delivered to the requested session. When subscribing to events, a 'donation event message' is delivered when a donation occurs on the subscribed channel. Related Scope: Donation Inquiry. A maximum of 30 events (chat, donation, subscription) can be subscribed per session. ### Method POST ### Endpoint /open/v1/sessions/events/subscribe/donation ### Parameters #### Request Body - **sessionKey** (String) - Required - Session identifier ``` -------------------------------- ### Access Token Authentication Source: https://chzzk.gitbook.io/chzzk/llms-full.txt APIs requiring Access Token authentication must include an 'Authorization' header with the token prefixed by 'Bearer '. Ensure there is a space between 'Bearer' and the token. ```APIDOC ## Access Token Authentication API ### Description This section details the request headers required for APIs that use Access Token authentication. An Authorization header with a Bearer token is mandatory. ### Method Not specified (assumed to be applicable to various HTTP methods) ### Endpoint Not specified ### Parameters #### Request Header - **Authorization** (String) - Required - Example: `Bearer FFok65zQFQVcFvH2eJ7SS7SBFlTXt0EZ10L5XXXXXXXX` - **Content-Type** (String) - Required - Example: `application/json` ``` -------------------------------- ### PUT /open/v1/chats/settings Source: https://chzzk.gitbook.io/chzzk/llms-full.txt Modifies the chat settings for a channel. Allows updating various parameters like chat availability, participation scope, slow mode, and emoji mode. ```APIDOC ## PUT /open/v1/chats/settings ### Description Modifies the chat settings for a channel. Allows updating various parameters like chat availability, participation scope, slow mode, and emoji mode. ### Method PUT ### Endpoint /open/v1/chats/settings ### Parameters #### Request Body - **chatAvailableCondition** (String) - Required - Condition for identity verification (NONE: unrestricted, REAL_NAME: only for viewers with Naver identity verification). - **chatAvailableGroup** (String) - Required - Condition for chat participation scope (ALL: all viewers, FOLLOWER: followers only, MANAGER: moderators only, SUBSCRIBER: subscribers only). - **minFollowerMinute** (Int) - Optional - Minimum following period condition applied when FOLLOWER mode is set. Allowed values: 0, 5, 10, 30, 60, 1440, 10080, 43200, 86400, 129600, 172800, 216000, 259200. - **allowSubscriberInFollowerMode** (boolean) - Optional - Whether to allow subscribers to be excluded from the minimum following period condition when FOLLOWER mode is set. - **chatSlowModeSec** (int) - Optional - Chat transmission interval for viewers in seconds. Allowed values: 0 (Off), 3, 5, 10, 30, 60, 120, 300. - **chatEmojiMode** (boolean) - Optional - Whether emoji mode is enabled. ### Request Example { "chatAvailableCondition": "REAL_NAME", "chatAvailableGroup": "FOLLOWER", "minFollowerMinute": 60, "allowSubscriberInFollowerMode": true, "chatSlowModeSec": 10, "chatEmojiMode": true } ```