MENU
      CLOVA Chatbot overview

        CLOVA Chatbot overview


        Article summary

        Available in Classic and VPC

        CLOVA Chatbot is a NAVER Cloud Platform service that identifies the intent of the user's question and provides appropriate answers in various formats. The CLOVA Chatbot Custom API provides an API for the question and answer feature in RESTful form based on the training results of the domain set in CLOVA Chatbot Builder, and is suitable if you want to implement a chatbot on the general web or app instead of the messenger channel.
        This guide describes how to send a request to CLOVA Chatbot from a Custom channel.

        CLOVA Chatbot integration and development process

        This section describes the process for Custom integration and development of CLOVA Chatbot.

        Integration process

        The integration process is as follows.

        1. Create a conversation scenario using the CLOVA Chatbot Builder.
        2. Build and deploy the conversation model.
        3. Set up CLOVA Chatbot Custom integration.
        4. Create an API Gateway call URL and issue a secret key.
        5. Call the API from the application with the API Gateway invoke URL.

        Development process

        The development process is as follows.

        1. Check the API Gateway invoke URL.
        2. Create a signature to generate the authentication key to pass in the request header.
          • Use the secret key generated in * CLOVA * Chatbot Custom.
        3. Create a response body value to request a conversation query.
        4. Make a request using the API Gateway invoke URL.

        Common CLOVA Chatbot settings

        The following describes commonly used request and response formats in CLOVA Chatbot Custom APIs.

        Request

        The following describes the common request format.

        API URL

        The request API URL is as follows.

        API Gateway's unique invoke URL created in CLOVA Chatbot Builder
        HTTP

        Request headers

        The following describes the headers.

        FieldRequiredDescription
        X-NCP-CHATBOT_SIGNATURERequiredBase64-encoded signature that encrypts the request information with a secret key and request body created on NAVER Cloud Platform's CLOVA Chatbot Custom, using the HMAC encryption algorithm (HmacSHA256)
      • Issue and check secret key: See How to issue and check secret key
      • Create signature: See X-NCP-CHATBOT_SIGNATURE creation examples
      • Content-TypeRequiredRequest data type

        How to issue and check secret key

        The following describes how to issue or check the secret key in CLOVA Chatbot.

        1. From the NAVER Cloud Platform console, click the Services > CLOVA Chatbot > Domain menus, in that order.
        2. Click the [Run builder] button of the domain you want to run the chatbot builder.
        3. From the chatbot builder, click [Chatbot settings] button.
        4. From the chatbot settings, click the Integrate messenger tab.
        5. Under the Custom item, click the [Integrate] button.
        6. Issue or check the secret key in the Integrate Custom pop-up.

        X-NCP-CHATBOT_SIGNATURE creation examples

        The following are examples of language-specific X-NCP-CHATBOT_SIGNATURE settings.

        • JavaScript

          const HmacSHA256 = require('crypto-js/hmac-sha256');
          const EncBase64 = require('crypto-js/enc-base64');
          signatureHeader = HmacSHA256(requestBodyString, secretKey).toString(EncBase64);
          JavaScript
        • Java

          byte[] secretKeyBytes = secretKey.getBytes(StandardCharsets.UTF_8);
          SecretKeySpec secretKeySpec = new SecretKeySpec(secretKeyBytes, "HmacSHA256");
          Mac mac = Mac.getInstance("HmacSHA256");
          mac.init(secretKeySpec);
          byte[] signature = mac.doFinal(body.getBytes(StandardCharsets.UTF_8));
          String signatureHeader = Base64.getEncoder().encodeToString(signature);
          Java

        Response

        The following describes the common response format.

        Response status codes

        The following describes the response status codes.

        Note

        For response status codes common to NAVER Cloud Platform, see Ncloud API response status codes.

        HTTP status codeCodeMessageDescription
        500-Internal server errorInternal server errors
        -1000version not supportUnsupported version
        -1001Not found domain codeDomain code not found
        -1002check url param is invalidInvalid URL parameter
        -4000request param invalidInvalid request parameter
        -4010UnauthorizedNot authenticated
        -4030Forbidden to accessAccess unauthorized
        -4031Signature validate failedSignature validation failed
        -4032timestamp exceeded time window(10000ms)Allowed time range (10000 ms) exceeded
        -5000Unknown service errorUnknown service error
        -5010Current protocol version not support this reply structureCurrent protocol version does not support this response structure
        -5020Calls to this api have exceeded the rate limitAPI call count limit exceeded

        CLOVA Chatbot Custom API

        The following describes the APIs provided by the CLOVA Chatbot Custom service.

        APIDescription
        OpenOpen the welcome message of CLOVA Chatbot
        SendSend questions to CLOVA Chatbot
        getPersistentMenuGet the list of persistent menus

        NAVER Cloud Platform provides a variety of related resources to help users better understand CLOVA Chatbot Custom APIs.


        Was this article helpful?

        Changing your password will log you out immediately. Use the new password to log back in.
        First name must have atleast 2 characters. Numbers and special characters are not allowed.
        Last name must have atleast 1 characters. Numbers and special characters are not allowed.
        Enter a valid email
        Enter a valid password
        Your profile has been successfully updated.