Broadcast-Development-Kit/docs/how-to-run-the-solution-in-.../test_web_app.md

34 строки
2.2 KiB
Markdown
Исходник Обычный вид История

Documentation (#1) * Added draft documents - Added prerequisites - Added how to run the solution locally - Added how to run the solution in Azure * Updated readme * Deleted unnecessary document * Updated documentation - Updated folder structure - How to run the solution locally: added steps to explain how to create ngrok config file - How to run the solution in azure: added new documents - Common: added step to explain where to put the required domain certificate for NGINX * Updated nginx guide - Updated nginx configuration - Fixed RTMP url in bash commands * Updated how to run the solution locally readme - Renamed placholders and change their descriptions - Removed unnecessary descriptions * Minor fix * Uppdated how to run the solution in azure - Added how to create containers needed by the solution in cosmos db - Added template of the service item the user must add in the service cosmos db container before running the solution for the first time. - Completed the document that explains how to deploy the Management API - Improved the introduction of the Azure SDK Service Principal document - Added section about how to add members in the Security Group document - Updated references from Bot Channels Registration to Azure Bot in all documents - Fixed typos and broken links * Updated how to run the solution in azure documents * WIP - Updated how to run the solution in azure * Updated how to run the solution in azure documents * Updated documentation * Updated documents - Minor feedback - Added document that explains how to get access token - Updated document references - Added document that explains how to test the azure function * Updated documentation
2021-07-08 22:53:56 +03:00
# How to test the Management API
## Getting Started
To verify that the **Management API** is running properly we will use [Postman](https://identity.getpostman.com/signup?continue=https%3A%2F%2Fgo.postman.co%2Fbuild) to join the bot to a Microsoft Teams meeting.
1. [Create](https://support.microsoft.com/en-us/office/schedule-a-meeting-in-teams-943507a9-8583-4c58-b5d2-8ec8265e04e5) a new Microsoft Teams meeting and join it.
![Microsoft Teams Invite Link](../how-to-run-the-solution-locally/images/invite_link.png)
1. Once you have joined the meeting **copy** the invitation link from the meeting and we will use it to join the bot to that meeting.
1. Open **Postman** and create a new POST request pointing to the following address: `https://{{webAppUrl}}/api/call/initialize-call`.
> **NOTE:** Replace the placeholder `{{webAppUrl}}` with the URL of the [Web App](web_app_and_app_service_plan.md) created in previous steps.
1. You must now obtain the token that allows validation to use the **Management API** endpoints. Check the following [documentation](authorization_token.md), which explains how to obtain the token.
1. Once the token is obtained, in the authorization tab, select `Bearer Token` for `Type` and add the authorization token in the corresponding input.
![Auht Header](images/test_web_app_postman_add_service_auth_header.png)
1. In the header tab, add (if it does not exist) a new key `Content-Type` with the value `application/json`.
![Postman Header](../how-to-run-the-solution-locally/images/postman_header.png)
1. In the **Body** tab select **raw** and complete by copying the following:
```json
{
"MeetingUrl": "{{microsoftTeamsInviteLink}}"
}
```
| Placeholder | Description |
|--------------------------|------------------------------|
| microsoftTeamsInviteLink | Microsoft Teams invite link. |
1. Click on the **Send** button and the request will be sent to the solution, you should receive a response with status `200 Ok` and after a few seconds the bot should join the Microsoft Teams meeting.
![Test with Postman](images/test_with_postman_web_app.png)
[← Back to How to Run the Solution in Azure](README.md#how-to-run-the-solution-in-azure)