Troubleshooting of Azure Cognitive Services API

From LemonWiki共筆
Revision as of 13:45, 21 April 2022 by Unknown user (talk) (Created page with "[https://azure.microsoft.com/zh-tw/services/cognitive-services/computer-vision/ 電腦視覺 | Microsoft Azure]: [https://docs.microsoft.com/zh-tw/azure/cognitive-services/Com...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

電腦視覺 | Microsoft Azure: 快速入門:光學字元辨識 (OCR) 用戶端程式庫或 REST API - Azure Cognitive Services | Microsoft Docs 支援中文[1]

How to fix the error: invalid subscription key or wrong API endpoint

Error message

{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}

Solution:

  • Verify the API endpoint
  • Verify the subscription key and add to request header


How to fix the error: Unsupported media type

Error message

{"error":{"code":"BadArgument","message":"Unsupported media type."}}

Solution: Add this item to request header

Content-Type: application/json

References


Troubleshooting of ...

Template