2
我試圖使用推薦curl
方法用於文本分析的微軟認知API:微軟認知API令牌不從<a href="https://www.microsoft.com/cognitive-services/en-us/text-analytics-api" rel="nofollow noreferrer">their documentation</a>工作
curl -v -X POST "https://westus.api.cognitive.microsoft.com/text/analytics/v2.0/sentiment" -H "Content-Type: application/jscp-Apim-Subscription-Key: {bc94cba9b84748ebb2f2b79a28ee3450}" --data-ascii "{I had a wonderful experience! The rooms were wonderful and the staff were helpful.}"
但我得到的結果:
{ "statusCode": 401, "message": "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." }
我也嘗試刪除周圍的令牌和要分析的文本的{}
。我在這裏做錯了什麼?
注:是的,我實現與顯示關鍵的安全問題,但我必須重新生成的感謝。