Access denied

Egbert Li 0 Reputation points
2024-05-07T06:09:26.5333333+00:00

While I test bing search api, it shows access denied, but it have been worked perfectly for the past few days.

curl --header "Ocp-Apim-Subscription-Key: xxxxxxxxx" "https://api.bing.microsoft.com/v7.0/custom/search?q=%E5%B0%8F%E7%B1%B3su70&customconfig=xxxxxxxxxxxxxxxxxxx&mkt=zh-CN"
Call

and the API Response shows:

{
  "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."
  }
}

my suscription id is in active status, I don't know how to solve this issue, please help me.

Bing Web Search
Bing Web Search
A Bing service that gives you enhanced search details from billions of web documents.
146 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 43,656 Reputation points Microsoft Employee
    2024-05-07T11:28:52.86+00:00

    @Egbert Li I can confirm that the custom search endpoint is working in my case.

    User's image

    Are you using the same keys as your global bing custom search resource form azure portal?

    User's image

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    0 comments No comments