api-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAPI Setup
API 搭建
This skill helps you set up a new API integration with our standard configuration.
本技能可帮助您按照我们的标准配置搭建新的API集成。
Steps
步骤
- Run to create the integration directory
setup.sh <api-name> - Copy to your integration directory
templates/config.template.json - Update the config with your API credentials
- Test the connection
- 运行 创建集成目录
setup.sh <api-name> - 将 复制到您的集成目录中
templates/config.template.json - 更新配置文件,填入您的API凭证
- 测试连接
Configuration
配置说明
The config template includes:
- : Your API key (get from the provider's dashboard)
api_key - : API endpoint URL
endpoint - : Request timeout in seconds (default: 30)
timeout
配置模板包含以下内容:
- : 您的API密钥(可从服务商控制台获取)
api_key - : API端点URL
endpoint - : 请求超时时间(单位:秒,默认值:30)
timeout
Verification
验证步骤
After setup, verify:
- Config file is valid JSON
- API key is set and not a placeholder
- Test connection succeeds
搭建完成后,请验证以下内容:
- 配置文件为有效的JSON格式
- API密钥已正确设置,而非占位符
- 连接测试成功
Troubleshooting
故障排查
Connection Timeout
连接超时
If you experience connection timeouts:
- Check your network connection
- Verify the endpoint URL is correct
- Increase the timeout value in config
如果遇到连接超时问题:
- 检查您的网络连接
- 验证端点URL是否正确
- 增加配置文件中的超时时间值
Authentication Errors
认证错误
If you get 401/403 errors:
- Verify your API key is correct
- Check if the key has the required permissions
- Ensure the key hasn't expired
如果出现401/403错误:
- 验证您的API密钥是否正确
- 检查该密钥是否具备所需权限
- 确认密钥未过期