Do I need any API key like how MS has used an API key to create an weather bot?

Smriti Rai 60 Reputation points
2023-07-17T13:42:25.2966667+00:00

Hello,

Do I need any API key like how MS has used an API key to create an weather bot? They are making an HTTP request to an external source, but I am making a HTTP request to AAD from bot framework composer. So, do I still need API key. If yes, could you please tell me where will I find it?

I am asking because while making HTTP request, I get "access token is empty", and it returns "invalidauthenticationtoken".

https://learn.microsoft.com/en-us/composer/tutorial-create-weather-bot

Regards

Smriti

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
941 questions
Microsoft Security Microsoft Entra Microsoft Entra ID
Microsoft Security Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. Azar 29,520 Reputation points MVP Volunteer Moderator
    2023-07-17T16:30:08.3166667+00:00

    Hi @Smriti Rai

    When making HTTP requests to external services from the Bot Framework Composer, you may need an API key or authentication depending on the service. In the weather bot tutorial, an API key is required to access weather data from OpenWeatherMap. To obtain the API key, follow the steps in the tutorial. Ensure you include the API key as a parameter in your HTTP request. For authentication with Azure Active Directory (AAD), you might need an access token. Consult the Azure documentation or AAD documentation for details on obtaining and using access tokens. Properly handle and secure API keys and access tokens. For further assistance, refer to the Bot Framework documentation or seek support from the Bot Framework community.

    below are a few documentation links kindly refer these:

    Kindly accept the answer if it helped for any assistance comment here thanks much.

    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.