Chat Log Collection System (CLCS)

send-chat-log

This API sends chat logs to Chat log collection system.

  • Request URL
    Commercial Server URL https://clcs.qpyou.cn/chat/api/v1/send-chat-log
    Sandbox Server URL https://sandbox-clcs.qpyou.cn/chat/api/v1/send-chat-log
    HTTP Method POST
    Content-Type application/json
  • Request Body
    Field Name Type Required Description
    game_key String Y

    The key value (16 characters) created from the company id and the game id. You can get this key on AI Service > Chat Abusing Detection > Game Management > Confirm Encryption Key in the Hive Console. The company id and game id can also be obtained in the Hive console AI service > Chat Abusing Detection > Game Management.

    Example) abcdefghijklmnop

    chat_log object Y the array or the collection of encrypted messages and the chat_count.
  • chat_log object
    Field Name Type Required Description
    chat_count int Y The number of msg in the msg_array.
    Ex) 32 (The chat_count and the size of msg_array containing encrypted msgs must be the same.)
    msg_array array Y 1 or more msg objects
  • msg object;
    Field Name Type Required Description
    time_stamp string Y

    Convert the time of occurrence of a chat message in ISO8601 format and transmit it. If you change the chat message timestamp with the ISO8601 format, ±hh:mm will be added at the tail of the timestamp according to the time zone to which the user who sent the message belongs.

    The examples of the time_stamp values according to the sender’s time zone and the chat message timestamp

    • When the time zone is UTC, and the chat message timestamp is 2023-03-30 17:13:00.
      • Use 2023-03-30T17:13:00+00:00 or 2023-03-30T17:13:00Z
      • +00:00 can also be written as Z (YYYY-MM-DDTHH:mm:ss{.mmm}±hh:mm or YYYY-MM-DDTHH:mm:ss{.mmm}Z)
    • When the time zone is KST (Korea Standard Time), and the chat message timestamp is 2023-03-30 17:13:00.
      • Use 2023-03-30T17:13:00+09:00
    • When the time zone is CST (Central Standard Time), and the chat message timestamp is 2023-03-30 17:13:00.
      • Use 2023-03-30T17:13:00-05:00

    msg string Y the JSON string encrypted with the encryption key issued from the Hive Console’s AI Service > Chat Abusing Detection > Game Management > Confirm Encryption Key (maximum size 2KB, AES256 encryption)
  • msg
    Field Name Type Required Description
    time_stamp string Y

    Convert the time of occurrence of a chat message in ISO8601 format and transmit it. If you change the chat message timestamp with the ISO8601 format, ±hh:mm will be added at the tail of the timestamp according to the time zone to which the user who sent the message belongs.

    The examples of the time_stamp values according to the sender’s time zone and the chat message timestamp

    • When the time zone is UTC, and the chat message timestamp is 2023-03-30 17:13:00.
      • Use 2023-03-30T17:13:00+00:00 or 2023-03-30T17:13:00Z
      • +00:00 can also be written as Z (YYYY-MM-DDTHH:mm:ss{.mmm}±hh:mm or YYYY-MM-DDTHH:mm:ss{.mmm}Z)
    • When the time zone is KST (Korea Standard Time), and the chat message timestamp is 2023-03-30 17:13:00.
      • Use 2023-03-30T17:13:00+09:00
    • When the time zone is CST (Central Standard Time), and the chat message timestamp is 2023-03-30 17:13:00.
      • Use 2023-03-30T17:13:00-05:00
    room_num int Y the chat room number

    Example) 123342

    lang_code int Y the language code
    Korean (ko) : 1, English (en): 2, Japanese (ja): 3, Simplified Chinese: 4, Traditional Chinese: 5, España(es): 6, Russia (ru): 7, German (de): 8, French (fr): 9, Portuguese (pt): 10, Italian (it): 11, Thai (th): 12, Indonesian (id): 13, Turkish (tr): 14, Malaysian (ms): 15, Vietnamese (vi): 16
    chat_msg string Y the chatting contents
    eg) Hello! The weather is good today.
    chat_mode int Y The chat types
    Example)
    100: general chat
    200: group (1:1~N) chatting
    300: whisper
    4NN: the custom chat type defined by the game studio
    channel_user_id int Y the user’s ID (playerId) in the game
  • Response
    Field Name Type Description
    result object the container for the output result
    result_code string Result Code
    result_msg string the result message
  • Result Code
    result_code result_msg Description
    200 Success The log transfer was successfully finished.
    500 Incorrect request There is an error in your request. Please check the request URL and the required request variables are correct.
    501 The number of messages does not match The number of messages and the chat_count do not match. The chat_count and the length of msg_array must match.
    502 Incorrect secret key Invalid secret key value.
    Please go to the Hive Console’s AI Service > Chat Abusing Detection > Game Management > Confirm Encryption Key and check the encryption key value.
    503 Unregistered game key Invalid game key value.
    Please go to the Hive Console’s AI Service > Chat Abusing Detection > Game Management > Confirm Encryption Key and check the game key value.
    506 System error This error occurs when the chat log collection system is down for maintenance.
    507 The size of the message is too large The size of the message is too large. The maximum size of msg_array is 2KB.
  • Examples
    • Python
    • Java
    • Curl
    • result