The document which you have provided also have a section which demonstrate how to get the access token.
Could you please check on below documentation:
https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-authentication?view=azure-bot-service-4.0#step-1-request-an-access-token-from-the-azure-ad-v2-account-login-service
Send a (non-reply) message to bot using bot connector API
Hi Team,
I have created an app in MS teams. I want to send message to the bot from my service. I tried sending message using following request via postman and it works fine.
POST https://smba.trafficmanager.net/apis/v3/conversations/abcd1234/activities/
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json
{
"type": "message",
"from": {
"id": "12345678",
"name": "Pepper's News Feed"
},
"conversation": {
"id": "abcd1234",
"name": "Convo1"
},
"recipient": {
"id": "1234abcd",
"name": "SteveW"
},
"text": "My bot's reply",
}
I'm looking for some client packages that I can use to extract bearer token and send the same request through my application.
documents referred -
https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-send-and-receive-messages?view=azure-bot-service-4.0#send-a-non-reply-message
https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-authentication?view=azure-bot-service-4.0#bot-to-connector
Microsoft Teams Development
Microsoft Teams Microsoft Teams for business Other
1 answer
Sort by: Most helpful
-
ChetanSharmamsft 1,036 Reputation points Microsoft External Staff Moderator
2022-02-20T15:29:04.53+00:00