Unable to access bot framework Apis
I'm trying to access conversation api to get reply from bot but getting 401
i have created a bot using below link
https://dev.botframework.com/
reply_message = {
"type": "message",
"from": {"id": bot_id, "name": bot_name},
"conversation": {"id": conversation_id},
"recipient": {"id": user_id, "name": user_name},
"text": message,
"replyToId": reply_to_id
}
url = f"{service_url}v3/conversations/{conversation_id}/activities"
response = requests.post(
url,
headers={
"Authorization": "Bearer " + access_token,
"Content-Type": "application/json"
},
json=reply_message
)
I'm passing JWT token generated from following end point
scope : https://api.botframework.com/.default
https://login.microsoftonline.com/TenentID/oauth2/v2.0/token
decode JWT getting
{
"aud": "https://api.botframework.com",
.....
}
kindly help me in this
i ref this document
https://learn.microsoft.com/en-us/previous-versions/azure/bot-service/rest-api/bot-framework-rest-connector-send-and-receive-messages?view=azure-bot-service-3.0