Forum Discussion
Send chat message with attachment in teams channel
URL: https://domainname.sharepoint.com/sites/sitename/Clients/00015/foldername/Test/Test%20Versions.docx
Can you please check with new attachment id? Please let us know if you are still facing this issue?
- Sai06Sep 16, 2022Copper Contributor
Nivedipa-MSFT - I have tried again as mentioned but still issue remains the same.
- Nivedipa-MSFTSep 19, 2022
Microsoft
Sai06 - There was an issue with View ID and Content URL.
The vieweId should be documented source ID, it will be visible in browser with the label "sourcedoc".
In the case of the root site, we need to provide /:x:/r/ in addition to the file path
Example for Correct URL Path:
https://domainname.sharepoint.com/:x:/r/Shared%20Documents/report.doccx
Can you please change accordingly and check again?- Sai06Sep 26, 2022Copper Contributor
Nivedipa-MSFT - I have made the changes that you have suggested, but still the issue persist.
We are trying to access a document from document library in a sub-site.Would that change the format of the url?
Below are the url's I have tried:
url: https://domainname.sharepoint.com/:x:/r/sites/sharedDocuments/IT.docx
Request body:
{
"body": {
"contentType": "html",
"content": "Sharepoint File Attachment. <attachment id=\"E8D71CE3-1EF1-4301-8D09-2228EC90C605\"></attachment>"
},
"attachments": [
{
"id": "E8D71CE3-1EF1-4301-8D09-2228EC90C605", => Source Id
"contentType": "reference",
"contentUrl": "https://domainname.sharepoint.com/:x:/r/sites/sharedDocuments/IT.docx",
"name": "IT.docx"
}
]
}