401 error: Invalid subscription or wrong API endpoint

AReno 20 Reputation points
2023-11-11T04:09:16.1333333+00:00

The search feature on my website just stopped working out of the blue today. This is what I am seeing:

User's image

It was working fine yesterday, without issue, but today, I get this message in search results:

User's image

What is going on here? We changed nothing in Azure or Bing Custom Search/Hosted UI, so I'm not sure where the disconnect is now. I have tried to troubleshoot by looking for any kind of subscription or search key in our Azure account, but I'm not having much luck. Any help is appreciated!

Bing Custom Search
Bing Custom Search
An easy-to-use, ad-free, commercial-grade search tool that lets you deliver the results you want.
81 questions
0 comments No comments
{count} votes

Accepted answer
  1. Dillon Silzer 54,841 Reputation points
    2023-11-11T06:18:44.7266667+00:00

    Hi Areno,

    I'd recommend checking under Keys and Endpoint to ensure you are utilizing the correct keys.

    User's image

    Also, I'd recommend checking your code against the examples:

    https://learn.microsoft.com/en-us/previous-versions/azure/cognitive-services/Bing-Web-Search/quickstarts/python#define-variables

    BingWebSearchv7.py

    https://github.com/Azure-Samples/cognitive-services-REST-api-samples/blob/master/python/Search/BingWebSearchv7.py

    (there are also other language samples as well)

    User's image


    If this is helpful please accept answer.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful