Send a (non-reply) message error 401 Unauthorized
Hi Team,
I have created an app in here https://portal.azure.com/ and bot here https://dev.botframework.com/bots
I want to send a non reply message to a user using bot but it keeps showing an error like this
{
"error": {
"code": "AuthorizationError",
"message": "Invalid JWT."
}
}
I'm pretty sure that I use the right bearer token for the authentication because I have successfully started a conversation between bot and user, and got the conversation_id
Here is my request for send a (non-reply) message [id will be blurred]
Method: POST
URL: https://smba.trafficmanager.net/apis/v3/conversations/{conversation_id}/activities
Authorization: Bearer ACCESS_TOKEN
Content-Type: application/json
Body
{
"type": "message",
"from": {
"id": "{bot_id}",
"name": "{bot_name}"
},
"conversation": {
"id": "{conversation_id}",
"name": "{conversation_name}"
},
"recipient": {
"id": "{receipient_id}",
"name": "{receipient_name}",
"aadObjectId": "{user_id}"
},
"text": "My bot's reply"
}
But then, I keep getting this error
Thank you for your help