I can't show message in Teams after success API request

Copper Contributor

I made new conversation as API with my bot in Teams with DirectLine chanel


and made sucsses request with message


And have correct answer 200OK with ID :


"id": "Bl1AgRQB1zz7xx8NrdFNe2-m|0000030"


But in Teams nothing events, not any messages.

Why probably reason of this behaviour?

not view message in teams.png

5 Replies

@Vladimir_Anokhin Thanks for reaching out us, Could you please share which document you are using and share more details about your issue.

Sorry, I didn't quite understand what documents you mean. In general, my problem is that I need to send a private message to a user in Teams via a bot via an https request. And although all requests seem to be executed correctly, messages do not come.

@Vladimir_Anokhin Could you please go through the documentation and try with sample. If you find any further issue please share manifest file so that we can repro from our end.

@Vladimir_Anokhin Please let us know if your issue has been resolved.
I found right way:

1 step - take information from bot's index.js about the participants in the conversation with the bot and save it to yourself - this can be done by sending a request from the bot to your script
const axios = require('axios');
axios.get('https://My_server/My_script.php', {
params: {
'context': context
.then(function (response) {

2 step - get Bearer token via request
Use Application ID and secret key in parameters
Note - token's life is 1 day, will get new if need

3 step - with token to create new conversation with user send request
WARNING - look at the exact url in the data that you received from the bot in step 1 - it may differ!

with body (all parameters you should save in yours base in step 1) :
"bot": {
"id": "BotID",
"name": "NameBot"

"isGroup": false,
"members": [
"id": "UserID",
"name": "User Name"
"topicName": "News Alert"
In answer you must get ID of new conversation - save it too

And finally - step 4 - send message to user with request

WARNING - look at the exact url in the data that you received from the bot in step 1 - it may differ!

and body like this or others variants of fields (don't forget use token which you got in step 2)

"type": "message",
"channelId": "msteams",
"conversation": {"id": "CONVERSATION_ID"},

"from":{"id": "BotID","name": "NameBot"},
"recipient":{"id": "UserID",
"name": "UserName"
"text": "Hi userName! Welcome from API.",
"channelData": {
"notification": {
"alert": true

I hope this helps someone lose a little less time than it does me :) .
@Chetana-MSFT , thank you for yours attention.