- Print
- PDF
CLOVA Chatbot overview
- Print
- PDF
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.
- Create a conversation scenario using the CLOVA Chatbot Builder.
- Build and deploy the conversation model.
- Set up CLOVA Chatbot Custom integration.
- Create an API Gateway call URL and issue a secret key.
- Call the API from the application with the API Gateway invoke URL.
Development process
The development process is as follows.
- Check the API Gateway invoke URL.
- Create a signature to generate the authentication key to pass in the request header.
- Use the secret key generated in * CLOVA * Chatbot Custom.
- Create a response body value to request a conversation query.
- 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
Request headers
The following describes the headers.
Field | Required | Description |
---|---|---|
X-NCP-CHATBOT_SIGNATURE | Required | Base64-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) |
Content-Type | Required | Request data type |
How to issue and check secret key
The following describes how to issue or check the secret key in CLOVA Chatbot.
- From the NAVER Cloud Platform console, click the Services > CLOVA Chatbot > Domain menus, in that order.
- Click the [Run builder] button of the domain you want to run the chatbot builder.
- From the chatbot builder, click [Chatbot settings] button.
- From the chatbot settings, click the Integrate messenger tab.
- Under the Custom item, click the [Integrate] button.
- 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);
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);
Response
The following describes the common response format.
Response status codes
The following describes the response status codes.
For response status codes common to NAVER Cloud Platform, see Ncloud API response status codes.
HTTP status code | Code | Message | Description |
---|---|---|---|
500 | - | Internal server error | Internal server errors |
- | 1000 | version not support | Unsupported version |
- | 1001 | Not found domain code | Domain code not found |
- | 1002 | check url param is invalid | Invalid URL parameter |
- | 4000 | request param invalid | Invalid request parameter |
- | 4010 | Unauthorized | Not authenticated |
- | 4030 | Forbidden to access | Access unauthorized |
- | 4031 | Signature validate failed | Signature validation failed |
- | 4032 | timestamp exceeded time window(10000ms) | Allowed time range (10000 ms) exceeded |
- | 5000 | Unknown service error | Unknown service error |
- | 5010 | Current protocol version not support this reply structure | Current protocol version does not support this response structure |
- | 5020 | Calls to this api have exceeded the rate limit | API call count limit exceeded |
CLOVA Chatbot Custom API
The following describes the APIs provided by the CLOVA Chatbot Custom service.
API | Description |
---|---|
Open | Open the welcome message of CLOVA Chatbot |
Send | Send questions to CLOVA Chatbot |
getPersistentMenu | Get the list of persistent menus |
CLOVA Chatbot related resources
NAVER Cloud Platform provides a variety of related resources to help users better understand CLOVA Chatbot Custom APIs.
- CLOVA Chatbot Custom API guides
- Common Ncloud response status codes: information on common response status codes of NAVER Cloud Platform used by the CLOVA Chatbot service
- API Gateway User Guide: subscription to the API Gateway service to integrate the domain's InvokeURL with API Gateway
- Basic guide to integrating CLOVA Chatbot with API Gateway: introduction to the basic integration of CLOVA Chatbot with API Gateway
- Sub Account User Guide: introduction to how to use Sub Account that helps the management of CLOVA Chatbot's administration permissions
- How to use the CLOVA Chatbot service
- CLOVA Chatbot User Guide: chatbot creation process, conversation component management, advanced utilization of chatbots, integration with messengers and extension services, and how to manage and troubleshoot chatbots in the NAVER Cloud Platform console
- Prerequisites for using CLOVA Chatbot: introduction to environment specifications supported in CLOVA Chatbot, cautions for use, and pricing information
- Ncloud use environment guide: guide on VPC and Classic environments and supported features
- Introduction to pricing, characteristics, and detailed features: summary of CLOVA Chatbot pricing system, characteristics, and detailed features of CLOVA Chatbot
- Latest service news: latest news related to CLOVA Chatbot
- FAQ: frequently asked questions from CLOVA Chatbot users
- Contact Us: Send direct inquiries in case of any unresolved questions that aren't answered by the user guides.