juicebox-install-auth
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseJuicebox 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
undefinedbash
undefinedNode.js
Node.js
npm install @juicebox/sdk
npm install @juicebox/sdk
Python
Python
pip install juicebox-sdk
undefinedpip install juicebox-sdk
undefinedStep 2: Configure Authentication
步骤2:配置认证
bash
undefinedbash
undefinedSet 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
undefinedecho 'JUICEBOX_API_KEY=your-api-key' >> .env
undefinedStep 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
错误处理
| Error | Cause | Solution |
|---|---|---|
| Invalid API Key | Incorrect or expired key | Verify key in Juicebox dashboard |
| Rate Limited | Exceeded quota | Check quota at https://juicebox.ai/docs |
| Network Error | Firewall blocking | Ensure outbound HTTPS allowed |
| Module Not Found | Installation failed | Run |
| 错误类型 | 原因 | 解决方案 |
|---|---|---|
| 无效API密钥 | API密钥不正确或已过期 | 在Juicebox控制台验证密钥有效性 |
| 速率限制 | 超出配额限制 | 访问https://juicebox.ai/docs查看配额情况 |
| 网络错误 | 防火墙拦截 | 确保允许HTTPS出站请求 |
| 模块未找到 | 安装失败 | 重新运行 |
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 for your first people search.
juicebox-hello-world认证成功后,可继续查看完成首次人员搜索。
juicebox-hello-world