我正在研究Cisco DevNet认证,但存在以下问题:
$ curl https://api.ciscospark.com/v1/messages -X POST -H "Authorization:Bearer MD...4" --data "toPersonEmail=jul...@hotmail.com" --data "text=Hi%20from%20DevNet"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 212 100 147 100 65 106 47 0:00:01 0:00:01 --:--:--
153{"message":"Failed to create room.","errors":[{"description":"Failed to create room."}],"trackingId":"ROUTER_5DE8B491-8B47-01BB-3B54-B39F39FD3B54"}
正确的输出应如下所示:
{
"id":"Y2l...mNh",
"roomId":"Y2l...WMy",
"toPersonEmail":"someone@cisco.com",
"roomType":"direct",
"text":"Hi from DevNet",
"personId":"Y2l...ODc",
"personEmail":"labs@chatbot.land",
"created":"2018-12-13T23:32:43.377Z"
}
我在做什么错了?
答案 0 :(得分:0)
可能是您给错了Authorization:Bearer 在网站上,您已检查自己是否是Authorization:Bearer,但是当我们将其复制并粘贴到cmd时,对我们而言这是不可见的,因此我们可以使用的Authorization:Bearer可能是错误,这就是为什么您出错了< / p>
答案 1 :(得分:0)
如果您尝试向自己发送消息,它将无法正常工作。尝试将“ toPersonEmail”设置为其他WebEx Teams联系人。 您也可以在此网站上找到您的解决方案: https://community.cisco.com/t5/devnet-sandbox/cisco-webex-api-excersice-failed-to-create-a-room/td-p/3919295