juicebox-install-auth

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Juicebox Install & Auth

Juicebox 安装与认证

Overview

概述

Set up Juicebox SDK and configure authentication credentials for the AI-powered people search platform.
设置Juicebox SDK并为这个AI驱动的人员搜索平台配置认证凭据。

Prerequisites

前提条件

  • Node.js 18+ or Python 3.10+
  • Package manager (npm, pnpm, or pip)
  • Juicebox account with API access
  • API key from Juicebox dashboard
  • Node.js 18+ 或 Python 3.10+
  • 包管理器(npm、pnpm或pip)
  • 拥有API访问权限的Juicebox账户
  • 从Juicebox控制台获取的API密钥

Instructions

操作步骤

Step 1: Install SDK

步骤1:安装SDK

bash
undefined
bash
undefined

Node.js

Node.js

npm install @juicebox/sdk
npm install @juicebox/sdk

Python

Python

pip install juicebox-sdk
undefined
pip install juicebox-sdk
undefined

Step 2: Configure Authentication

步骤2:配置认证

bash
undefined
bash
undefined

Set environment variable

设置环境变量

export JUICEBOX_API_KEY="your-api-key"
export JUICEBOX_API_KEY="your-api-key"

Or create .env file

或创建.env文件

echo 'JUICEBOX_API_KEY=your-api-key' >> .env
undefined
echo 'JUICEBOX_API_KEY=your-api-key' >> .env
undefined

Step 3: Verify Connection

步骤3:验证连接

typescript
import { JuiceboxClient } from '@juicebox/sdk';

const client = new JuiceboxClient({
  apiKey: process.env.JUICEBOX_API_KEY
});

const result = await client.search.test();
console.log(result.success ? 'OK' : 'Failed');
typescript
import { JuiceboxClient } from '@juicebox/sdk';

const client = new JuiceboxClient({
  apiKey: process.env.JUICEBOX_API_KEY
});

const result = await client.search.test();
console.log(result.success ? 'OK' : 'Failed');

Output

输出结果

  • Installed SDK package in node_modules or site-packages
  • Environment variable or .env file with API key
  • Successful connection verification output
  • SDK包已安装至node_modules或site-packages目录
  • 包含API密钥的环境变量或.env文件
  • 连接验证成功的输出信息

Error Handling

错误处理

ErrorCauseSolution
Invalid API KeyIncorrect or expired keyVerify key in Juicebox dashboard
Rate LimitedExceeded quotaCheck quota at https://juicebox.ai/docs
Network ErrorFirewall blockingEnsure outbound HTTPS allowed
Module Not FoundInstallation failedRun
npm install
or
pip install
again
错误类型原因解决方案
无效API密钥API密钥不正确或已过期在Juicebox控制台验证密钥有效性
速率限制超出配额限制访问https://juicebox.ai/docs查看配额情况
网络错误防火墙拦截确保允许HTTPS出站请求
模块未找到安装失败重新运行
npm install
pip install
命令

Examples

示例

TypeScript Setup

TypeScript 配置示例

typescript
import { JuiceboxClient } from '@juicebox/sdk';

const client = new JuiceboxClient({
  apiKey: process.env.JUICEBOX_API_KEY,
  timeout: 30000
});
typescript
import { JuiceboxClient } from '@juicebox/sdk';

const client = new JuiceboxClient({
  apiKey: process.env.JUICEBOX_API_KEY,
  timeout: 30000
});

Python Setup

Python 配置示例

python
from juicebox import JuiceboxClient
import os

client = JuiceboxClient(
    api_key=os.environ.get('JUICEBOX_API_KEY')
)
python
from juicebox import JuiceboxClient
import os

client = JuiceboxClient(
    api_key=os.environ.get('JUICEBOX_API_KEY')
)

Resources

参考资源

Next Steps

下一步操作

After successful auth, proceed to
juicebox-hello-world
for your first people search.
认证成功后,可继续查看
juicebox-hello-world
完成首次人员搜索。