Access denied due to invalid subscription key or wrong API endpoint.

HHjAh 0 Reputation points


Trying to make an call to the bing image search.

curl ""

But getting the following error:

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.

Not sure what I'm doing wrong as I've grabbed the key from the key1 input.

Screenshot 2023-05-03 at 14.33.44

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

1 answer

Sort by: Most helpful
  1. VasaviLankipalle-MSFT 15,426 Reputation points

    Hi @HHjAh , Thanks for using Microsoft Q&A Platform.

    Please make sure you are using correct subscription key or API endpoint.

    I have reproduced this everything works well on my end. Here's the CURL command again for your reference please try this:

    curl "" -H "Ocp-Apim-Subscription-Key: YOUR_SECRET_KEY"

    Replace YOUR_SECRET_KEY with your actual subscription key. If the issue still persists, I would recommend regenerating your subscription key in the Azure portal and try again.

    I hope this helps.


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

    2 people found this answer helpful.
    0 comments No comments