Getting http 401 unauthorized access for the bing image search api

Kal 0 Reputation points
2023-09-30T10:10:57.7433333+00:00

User's image

Bing Image Search
Bing Image Search
A Bing service that supports searching for images and gets comprehensive results.
49 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. VasaviLankipalle-MSFT 18,061 Reputation points
    2023-10-02T22:24:01.32+00:00

    Hello @Kal , Thanks for using Microsoft Q&A Platform.

    As per the error 401 looks like this issue can be either the subscription key is missing or is not valid. Try to verify your subscription key and if possible, regenerate the key in the Azure portal and try with the latest key.

    Also try to check this related to the InvalidAuthorization error code and troubleshoot these things:

    • Bing returns InvalidAuthorization when Bing cannot authenticate the caller. For example, if the Ocp-Apim-Subscription-Key header is missing or the subscription key is not valid.
    • Redundancy occurs if you specify more than one authentication method.
    • If the error is InvalidAuthorization, the HTTP status code is 401:

    https://learn.microsoft.com/en-us/bing/search-apis/bing-image-search/reference/error-codes#error-codes

    I hope this helps.

    Regards,
    Vasavi

    -Please kindly accept the answer and vote 'yes' if you feel helpful to support the community, thanks.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.