Hello,
I am using microsoft Bot SDK v3 framwork. I tried sending attachments to the msteams from the external bot framework, first by uploading the attachment to the sharepoint and then used the downloadUrl and id of the attachment in the payload as mentioned in this link https://learn.microsoft.com/en-us/microsoftteams/platform/resources/bot-v3/bots-files.
I am getting error statusCode 400 and bad request sent
payload:
{
"attachments": [{
"contentType": "application/vnd.microsoft.teams.file.download.info",
"contentUrl": "https://contoso.sharepoint.com/personal/johnadams_contoso_com/Documents/Applications/file_example.txt",
"name": "file_example.txt",
"content": {
"downloadUrl" : "https://download.link",
"uniqueId": "1150D938-8870-4044-9F2C-5BBDEBA70C9D",
"fileType": "txt",
"etag": "123"
}
}]
}
I used the curl https://graph.microsoft.com/v1.0/drives/:driveId/root:/doc1/Samplepdf.pdf:/content
for uploading the attachment to the sharepoint by generating the access token. Can someone help me with this?
@microsoft @MicrosoftTechCommunity @msteams