How to fix "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." issue while getting response

Neha Parate 15 Reputation points
2023-09-29T05:49:42.9733333+00:00

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.

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
774 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ramr-msft 17,651 Reputation points
    2023-09-29T07:36:59.0333333+00:00

    Neha Parate Thanks for the question, Can you please add more details about the API call that you are making.

    Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource.” typically occurs when the subscription key or the API endpoint provided is incorrect.

    Here are some steps you can take to resolve this issue:

    Check your subscription key: Make sure that the subscription key you’re using is valid and active. You can usually find this in your Azure portal or the platform where you obtained the API.

    Check your API endpoint: Ensure that you’re using the correct API endpoint for your resource. The endpoint usually depends on the region where your resource is located.

    1. Check your code: If you’re using code to access the API, make sure that the subscription key and the API endpoint are correctly implemented in your code