【发布时间】:2017-03-23 09:23:57
【问题描述】:
请,我正在尝试使用 WSO2 ESB 的 BM Watson 对话 API,但问题是我没有找到如何在我的配置中添加凭据。 我尝试了一个标题和一个属性,但没有任何效果我仍然有一个未授权的消息。
这是我正在尝试实现但不知道将用户名和密码放在哪里的请求:
curl -X POST -u "{username}":"{password}" —-header "Content-Type:application/json" --data "{\"input\": {\"text\": \"Turn on the lights\"}, \"context\": {\"conversation_id\": \"1b7b67c0-90ed-45dc-8508-9488bc483d5b\", \"system\": {"dialog_stack":[{"dialog_node":"root"}], \"dialog_turn_counter\": 1, \"dialog_request_counter\": 1}}}" "https://gateway.watsonplatform.net/conversation/api/v1/workspaces/25dfa8a0-0263-471b-8980-317e68c30488/message?version=2017-02-03"
谢谢
【问题讨论】: