Refer to the document and link the AI tagging/search function to the service and test it.
Learn how to develop using the taggingBox SDK.
A collection of questions and answers frequently asked.
npm install tbmini-sdk
import { TaggingSDK } from 'tbmini-sdk';
const sdk = new TaggingSDK();
sdk.init({
applicationKey: 'your-application-key',
userKey: 'user-unique-id',
locale: 'ko' // or 'en'
});
sdk.createTaggingBox({
containerId: 'tagging-container',
width: '25rem',
height: '600px',
animation: 'fadeIn',
animationDuration: '0.5s'
});import React, { useEffect } from 'react';
import { TaggingSDK } from 'tbmini-sdk';
function App() {
useEffect(() => {
const sdk = new TaggingSDK();
sdk.init({
applicationKey: 'your-application-key',
userKey: 'user-unique-id',
locale: 'ko' // or 'en'
});
sdk.createTaggingBox({
containerId: 'tagging-container',
width: '25rem',
height: '600px',
animation: 'fadeIn',
animationDuration: '0.5s'
});
}, []);
return (
<div className="container">
<h1>tbmini-sdk React Example</h1>
<div id="tagging-container"></div>
</div>
);
}
export default App;<template>
<div class="container">
<div id="tagging-container"></div>
</div>
</template>
<script>
import { TaggingSDK } from 'tbmini-sdk';
export default {
name: 'App',
mounted() {
const sdk = new TaggingSDK();
sdk.init({
applicationKey: 'your-application-key',
userKey: 'user-unique-id',
locale: 'ko' // or 'en'
});
sdk.createTaggingBox({
containerId: 'tagging-container',
width: '25rem',
height: '600px',
animation: 'fadeIn'
});
}
}
</script><!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<title>tbmini-sdk Example</title>
<script src="https://unpkg.com/tbmini-sdk@latest/dist/tbmini-sdk.min.js"></script>
</head>
<body>
<div id="tagging-container"></div>
<script>
window.TaggingSDK.init({
applicationKey: 'your-application-key',
userKey: 'user-unique-id',
locale: 'ko'
});
window.TaggingSDK.createTaggingBox({
containerId: 'tagging-container',
width: '25rem',
height: '600px',
animation: 'fadeIn',
animationDuration: '0.5s'
});
</script>
</body>
</html>TaggingBox.init({
containerId: 'tagging-container', // required
apiKey: 'your-api-key', // required
userKey: 'user-unique-id' // required
});TaggingBox.init({
containerId: 'tagging-container',
apiKey: 'your-api-key',
userKey: 'user-unique-id',
width: '400px', // default: '400px'
height: '600px' // default: '600px'
});// Set container style after SDK initialization
TaggingBox.init({
containerId: 'tagging-container',
apiKey: 'your-api-key',
userKey: 'user-unique-id'
});
// Set container style
const container = document.getElementById('tagging-container');
container.style.position = 'fixed';
container.style.top = '5rem';
container.style.right = '2rem';
container.style.zIndex = '999';
container.style.height = '100vh';
container.style.width = '25rem';// animation options
TaggingBox.init({
containerId: 'tagging-container',
apiKey: 'your-api-key',
userKey: 'user-unique-id',
animation: 'slideInLeft',
animationDuration: '0.5s'
});// Use the default icon
TaggingBox.init({
containerId: 'tagging-container',
apiKey: 'your-api-key',
userKey: 'user-unique-id'
});
// Use custom SVG icon
TaggingBox.init({
containerId: 'tagging-container',
apiKey: 'your-api-key',
userKey: 'user-unique-id',
iconSvg: `<svg width="60" height="60" viewBox="0 0 24 24" fill="none">
<circle cx="12" cy="12" r="10" fill="#007bff"/>
<path d="M12 6v6l4 2" stroke="white" stroke-width="2"/>
</svg>`,
iconSize: '80px',
iconPosition: { bottom: '30px', right: '30px' }
});
// Use image URL
TaggingBox.init({
containerId: 'tagging-container',
apiKey: 'your-api-key',
userKey: 'user-unique-id',
iconSvg: `<img src="https://example.com/icon.png" alt="Custom Icon" class="tagging-icon">`,
iconSize: '70px'
});// Show the floating icon first (default)
TaggingBox.init({
containerId: 'tagging-container',
apiKey: 'your-api-key',
userKey: 'user-unique-id',
showIconFirst: true // default: true
});
// If you are showing TaggingBox right away
TaggingBox.init({
containerId: 'tagging-container',
apiKey: 'your-api-key',
userKey: 'user-unique-id',
showIconFirst: false // Show the box without the icon first
});tbmini SDK supports two authentication methods. (Secured On / Secured Off)
The customer's backend calls the /api/v1/sdk_api/v1.1/client_auth/client_access_key API to issue an access_key and passes it to the doAuth method.
const sdk = new TaggingSDK();
sdk.init({
applicationKey: 'your-application-key',
userKey: 'user-unique-id',
doAuth: async (userKey) => {
// 고객사 백엔드에서 Application Secret을 사용하여 access_key 발급
const response = await fetch('https://your-backend.com/api/get-access-key', {
method: 'POST',
body: JSON.stringify({ user_key: userKey })
});
const data = await response.json();
return data.access_key; // access_key 반환
}
});The customer's backend is implemented as follows
// 고객사 백엔드 예시
app.post('/api/get-access-key', async (req, res) => {
const { user_key } = req.body;
// Application Secret을 사용하여 tbmini API 호출
const response = await fetch(
`https://developers.tbmini.im/api/v1/sdk_api/v1.1/client_auth/client_access_key?user_key=${user_key}`,
{
method: 'POST',
headers: {
'X-API-Key': process.env.APPLICATION_API_KEY,
'X-API-Secret': process.env.APPLICATION_API_SECRET
}
}
);
const data = await response.json();
res.json({ access_key: data.access_key });
});The customer's backend provides an endpoint that issues an access_key, and the SDK uses that URL.
const sdk = new TaggingSDK();
sdk.init({
applicationKey: 'your-application-key',
userKey: 'user-unique-id',
authURL: 'https://your-backend.com/api/get-access-key' // 고객사 백엔드 엔드포인트
});The customer's backend should accept the user_key as a query parameter and return the access_key
// 고객사 백엔드 예시
app.post('/api/get-access-key', async (req, res) => {
const { user_key } = req.query;
// Application Secret을 사용하여 tbmini API 호출
const response = await fetch(
`https://developers.tbmini.im/api/v1/sdk_api/v1.1/client_auth/client_access_key?user_key=${user_key}`,
{
method: 'POST',
headers: {
'X-API-Key': process.env.APPLICATION_API_KEY,
'X-API-Secret': process.env.APPLICATION_API_SECRET
}
}
);
const data = await response.json();
res.json({ access_key: data.access_key });
});With the issued access_key, the SDK automatically calls the /api/v1/sdk_api/v1.1/client_auth?access_key=(access_key) GET API to obtain the final token.
If set to "Secured off" on the console, the SDK directly calls the /api/v1/sdk_api/v1.1/client_auth POST API to obtain the token.
In this case, you can easily obtain tokens by putting the Application Key in the x-api-key header and the user_key in the user_key.
const sdk = new TaggingSDK();
sdk.init({
applicationKey: 'your-application-key',
userKey: 'user-unique-id'
// doAuth나 authURL 설정 불필요
});Note: Secure Off is highly recommended in production environments because of the risk of user account leakage.
init method options| Option | Type | Required | Default | Description |
|---|---|---|---|---|
| applicationKey | string | Yes | - | Application Key issued by console (public key, not Secret) |
| userKey | string | Yes | - | Unique key identifying the user |
| locale | string | No | 'ko' | Language setting ('ko' or 'en') |
| authURL | string | No | apiBaseUrl + '/client_auth' | Backend URL for end-user security authentication (client server). Used when Secured On |
| doAuth | function | No | - | Custom user authentication method. Must return access_key in the form `async (user_key: string) => Promise(string)`. * When this option is set, authURL is ignored. |
createTaggingBox method options| Option | Default | Example | Description |
|---|---|---|---|
| width | '400px' | width: '400px' | TaggingBox width |
| height | '600px' | height: '600px' | TaggingBox height |
| Option | Default | Example | Description |
|---|---|---|---|
| animation | 'slideInRight' | animation: 'slideInRight' | Type of animation when rendering (slideInLeft, slideInTop, fadeIn, zoomIn, none) |
| animationDuration | '0.3s' | animationDuration: '0.3s' | Duration of animation (in milliseconds) |
| Option | Default | Example | Description |
|---|---|---|---|
| showIconFirst | true | showIconFirst: true | Floating Icon Display |
| containerId | https://developers.tbmini.im | apiBaseUrl: 'https://developers.tbmini.im' | ID of the container element where the SDK will be rendered |
| Option | Default | Example | Description |
|---|---|---|---|
| logoSvg | - | logoSvg: '<svg>...' | Custom Logo SVG |
| logoWidth | '60px' | logoWidth: '60px' | Width of Logo Image |
| logoHeight | '20px' | logoHeight: '20px' | Height of Logo Image |
| Option | Default | Example | Description |
|---|---|---|---|
| iconSvg | - | iconSvg: '<svg>...' | Floating Icon SVG |
| iconSize | '60px' | iconSize: '60px' | Size of Floating Icon |
| iconPosition | bottom: '20px', right: '20px' | iconPosition: { bottom: '20px', right: '20px' } | Position of Floating Icon (top, left, right, bottom) |
After initializing the SDK, you can access API functions through the getAPIs() method.
const sdk = new TaggingSDK();
sdk.init({
applicationKey: 'your-application-key',
userKey: 'user-unique-id'
});
const apis = sdk.getAPIs();
// API 함수 사용 예시
const boxes = await apis.getClientBoxes();Creates user context information and retrieves box information.
| Input Parameters | x |
| Output | { boxes: Array<{box_id, name}>, ... } → User box information and context data |
| API Endpoint | POST /client/context |
Retrieves the client's box list.
| Input Parameters | x |
| Output | { boxes: Array<{box_id, name}>, plan_limits: {max_boxes_per_client, current_boxes_for_client} } → Box list and plan limit information |
| API Endpoint | GET /client/boxes |
Updates box name.
| Input Parameters | box_id (number): Box ID to update name (string): New box name |
| Output | { box_id, name, owner_public_client_id } → Updated box information |
| API Endpoint | PATCH /client/boxes/{box_id} |
Changes box order.
| Input Parameters | orderedList (Array): List of box IDs in changed order |
| Output | None (notification shown on success) |
| API Endpoint | PUT /client/boxes/order |
Saves content and requests tag recommendations.
| Input Parameters | title : Content title url : Original URL content : Content text input_type : Input type (DIRECT, PASTE, FILE_UPLOAD, API, UNKNOWN) box_id(string) : Box ID to save to recommend_tags : Whether to recommend tags |
| Output | { request_id : string, recommended_tags: Array<{name : string, source : string}>, ... } → Request ID and recommended tag list |
| API Endpoint | POST /recommendations |
Saves recommended tags.
| Input Parameters | request_id(string) : request_id from postRecommendations box_id(string) : Box ID to save to tags : List of tags to save |
| Output | { request_id, ... } → Request ID and save result |
| API Endpoint | POST /tags |
Retrieves master list for chatbot.
| Input Parameters | x |
| Output | { total_count, items: Array<{title, text_content, ...}>, skip, limit} |
| API Endpoint | GET /chatbot/masters?skip=0&limit=20 |
Performs chatbot search.
| Input Parameters | query : User's search query master_box_id(string) : Specific Master Box ID to search (optional) room_id(number) :Existing room ID (creates new room if none) |
| Output | { room_id, query: {id, user_query, context, ai_answer, master_box_id_used, sequence_number, created_at}, deducted_credits, message, context } |
| API Endpoint | POST /chatbot/search |
Retrieves content list of a specific master box.
| Input Parameters | master_box_id(string) : Master box ID to query |
| Output | { total_count, items: Array<{title, text_content, master_box_id, is_chatbot_enabled, master_content_id, master_id, tags, created_at, updated_at, request_id}>, skip, limit } |
| API Endpoint | GET /chatbot/boxes/{master_box_id}/contents?skip=0&limit=100 |
Retrieves chatbot room list.
| Input Parameters | x |
| Output | Array<{room_id, title, initial_master_box_id, created_at, updated_at, query_count}> |
| API Endpoint | GET /chatbot/rooms |
Retrieves detailed information (chat history) of a specific chatbot room.
| Input Parameters | room_id(number) :Room ID to query |
| Output | { room_id, title, requesting_client_public_id, content_owner_master_id, initial_master_box_id, created_at, updated_at, total_queries, queries: Array<{id, user_query, context, ai_answer, master_box_id_used, sequence_number, created_at}> } |
| API Endpoint | GET /chatbot/rooms/{room_id} |
Performs RAG search on content within specified Client Box and records results in Room.
| Input Parameters | query : RAG search query box_id(string) : Client Box ID to use as search context (optional) room_id(number) :Existing search record room ID (creates new if none) |
| Output | { room_id: number, query: string, answer: string, box_id_used: string, sequence_number: number, created_at: string, deducted_credits: number, context: Array<string> } → RAG search results and metadata |
| API Endpoint | POST /rag/search |
Performs RAG search on content within all accessible Client Boxes and records results in Room.
| Input Parameters | query : RAG search query room_id(number) :Existing search record room ID (creates new if none) |
| Output | { room_id: number, query: string, answer: string, box_id_used: string, sequence_number: number, created_at: string, deducted_credits: number, context: Array<string> } → RAG search results and metadata |
| API Endpoint | POST /rag/search-all-boxes |
Retrieves list of all Client's RAG search record rooms.
| Input Parameters | limit : Number of items to retrieve (max 50, min 1), default 20 skip : Number of items to skip (pagination), default 0 |
| Output | Array<{room_id: number, title: string, initial_box_id: string, created_at: string, updated_at: string, query_count: number}> → RAG search record room list |
| API Endpoint | GET /rag/rooms?limit={limit}&skip={skip} |
Retrieves all Q&A from a specific RAG search record room.
| Input Parameters | room_id(number) :Search record room ID to query skip : Number of messages to skip, default 0 limit : Number of messages to retrieve, default 100 |
| Output | { room_id: number, title: string, initial_box_id: string, created_at: string, updated_at: string, total_queries: number, queries: Array<{sequence_number: number, user_query: string, context: Array<string>, ai_answer: string, box_id_used: number, created_at: string}> } → RAG search record room details |
| API Endpoint | GET /rag/rooms/{room_id}?skip={skip}&limit={limit} |
Retrieves content list (Box filtering available).
| Input Parameters | box_id(string) : Box ID to filter (optional) limit : Number of items per page (min 1, max 100), default 20 offset : Number of items to skip, default 0 |
| Output | { total_count: number, limit: number, offset: number, items: Array<{request_id: string, box_id: string, owner_public_client_id: string, title: string, content: string, url: string, created_dt: string, updated_dt: string, associated_tags: Array<{tag_id: number, tag_nm: string, scope: string}>}> } → Content list and metadata |
| API Endpoint | GET /client/contents?box_id={box_id}&limit={limit}&offset={offset} |
Retrieves detailed content information.
| Input Parameters | request_id (string): request_id of content to query (short Hex) |
| Output | { request_id: string, box_id: string, owner_public_client_id: string, title: string, content: string, url: string, created_dt: string, updated_dt: string, associated_tags: Array<{tag_id: number, tag_nm: string, scope: string}> } → Detailed content information |
| API Endpoint | GET /contents/{request_id} |
Deletes content corresponding to given request_id.
| Input Parameters | request_id (string): request_id of content to delete (short Hex) |
| Output | None (204 response on success) |
| API Endpoint | DELETE /contents/{request_id} |
Modifies title, content, URL, etc. of specific content.
| Input Parameters | request_id(string) : request_id of content to modify title : Content title to change (optional) content : Content text to change (optional) url : Original URL to change (optional) |
| Output | { request_id: string, box_id: string, owner_public_client_id: string, title: string, content: string, url: string, created_dt: string, updated_dt: string, associated_tags: Array<{tag_id: number, tag_nm: string, scope: string}> } → Modified content information |
| API Endpoint | PATCH /contents/{request_id} |
Partially modifies tags linked to specific content.
| Input Parameters | request_id(string) : request_id of content to modify tags tags_to_add : List of tags to add tags_to_remove : List of tag names to remove |
| Output | { request_id: string, box_id: string, owner_public_client_id: string, title: string, content: string, url: string, created_dt: string, updated_dt: string, associated_tags: Array<{tag_id: number, tag_nm: string, scope: string}> } → Modified content and tag information |
| API Endpoint | PATCH /contents/{request_id}/tags |