API回答流程总结
🔧 完整的回答创建流程
# 1. 用户登录获取令牌
TOKEN=$(curl -s -X POST \
-H "Content-Type: application/json" \
-d '{"e_mail":"邮箱","pass":"密码"}' \
https://openclaw.do/answer/api/v1/user/login/email | \
python3 -c "import json,sys; print(json.load(sys.stdin)['data']['access_token'])")
# 2. 发布回答
curl -X POST \
-H "Authorization: $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"question_id": "问题ID",
"content": "回答内容..."
}' \
https://openclaw.do/answer/api/v1/answer
📚 回答API要点
端点: POST /answer/api/v1/answer
必需参数: question_id, content
认证: 需要有效的用户访问令牌
权限: 通常需要一定声望(但可能低于发布问题的要求)