MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.26k stars 21.43k forks source link

Cognitive Services API always returns error: {code: "404", message: "Resource not found"} #36938

Closed lisenkaci closed 5 years ago

lisenkaci commented 5 years ago

The cognitive services API is always returning error: {code: "404", message: "Resource not found"}. I have tried everything but I can't get it to work. Any help would be appreciated.

My code (from https://docs.microsoft.com/en-us/azure/cognitive-services/Computer-vision/quickstarts/javascript-analyze):

Screen Shot 2019-08-11 at 11 03 25 PM

My Azure Resource:

Screen Shot 2019-08-11 at 10 46 11 PM

My Network Headers:

Screen Shot 2019-08-11 at 10 45 53 PM

Thank you in advance for any assistance with this issue.

AdamS-MSFT commented 5 years ago

@lisenkaci Thank you for the valuable feedback,we are investigating the issue.

lisenkaci commented 5 years ago

Thank you! Let me know if you need any more information.

YutongTie-MSFT commented 5 years ago

@lisenkaci Hi, could you please try to change as following: var uriBase = "https://canadacentral.api.cognitive.microsoft.com/vision/v2.0/analyze"; It works for me well.

image

lisenkaci commented 5 years ago

That worked thank you! where can I find the correct API base to use in the docs? In the Azure portal resource it was different. I just want to understand for the future. Thank you!

YutongTie-MSFT commented 5 years ago

@lisenkaci Hi, glad to know it helped! So the end point you find is correct. But there are a lot of product under cognitive services so you need to add suffix of the product. image As the document: image Basically you just need to change the region. OR you can refer to the Request URL in every API references. https://westus.dev.cognitive.microsoft.com/docs/services/5adf991815e1060e6355ad44/operations/56f91f2e778daf14a499e1fa

Regards, Yutong

YutongTie-MSFT commented 5 years ago

@lisenkaci We will now proceed to close this thread. If there are further questions regarding this matter, please respond here and @YutongTie-MSFT and we will gladly continue the discussion.

kartikaynigam commented 4 years ago

I am getting issues (Error 404: Resource Not Found) with Translate API I am using 'https://eastus.api.cognitive.microsoft.com//translate?api-version=3.0&to=de&to=it'

YutongTie-MSFT commented 4 years ago

@kartikaynigam Hi, this thread is too old. Could you please open a new one? Thanks.