Search code examples
azurehttp-status-code-404azure-cognitive-services

azure - keep receiving 404 for a cognitive service I just signed up?


This is super werid.

So I just created my resource group and signed up for a cognitive service.

pretty sure i have the right key and the right resource url.

yet I kept receiving "404 resource not" found for every api call i made to it.

Anyone ever ran into a problem similiar to this? And what do you think what might be the problem here? Will super appreicate any suggestions & recommendtions on how to resolve it!


Solution

  • solved it.. imageSearchEndPoint in

    const client = new ImageSearchClient(cognitiveServiceCredentials, {
      endpoint: imageSearchEndPoint,
    });
    

    (of the @azure/cognitiveservices-imagesearch) should just be the full domain name and not the full api url

    i.e. https://meow.cognitiveservices.azure.com/ and not https://meow.cognitiveservices.azure.com/bing/v7.0.