Forum Discussion
Get list of conversations a bot has participated in from BotConnectorAPI
Hi! My team is building a Microsoft Teams bot, and we are trying to get a list of conversations (channels) that the bot has participated in using the BotConnectorAPI.
We are trying to use this endpoint: https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-api-reference?view=azure-bot-service-4.0#get-conversations, however we keep getting 405 errors "The requested resource does not support http method 'GET'". Are we doing something wrong, or is there any other endpoint we can use?
- Vaibhav-MSFTMicrosoft
Hello jlincroft ,
Try generating access token from below link-
https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-authentication?view=azure-bot-service-4.0&tabs=multitenant#bot-to-connector
And follow the below endpoint for getting the list of conversation has participated in-
/v3/conversations?continuationToken={continuationToken}
Note- Continuation token can be obtained from GetConversationsAsync, since it uses the GET Conversations API.- jlincroftCopper Contributor
Hi Vaibhav-MSFT
Yes, I have generated the access token and included it in the request.
What do you mean by GetConversationsAsync? The endpoint I'm trying to call is the one you listed, /v3/conversations, but is returning a 405. Is the continuation token required for that endpoint?
- Vaibhav-MSFTMicrosoft
Hello jlincroft ,
Yes, the continuation token is required for the endpoint.GetConversationsAsync
method uses the Get Conversations API. This API must be called many times in sequence in order to retrieve all the conversations a bot has participated in.
And can you confirm if you still getting 405 error?