Forum Discussion
How do we send Files using Attach Icon From Teams channels using Teams bot ?
- Jan 07, 2022
Praveena5 - As per document, There are two ways to send files to and from a bot:
1.Using the Microsoft Graph APIs:-
This method works for bots in all scopes in Teams: [personal , channel , groupchat]
2.Using the Teams APIs:-
These only support files in one context: [personal]So, you can post messages with card attachments referencing existing SharePoint files using the Microsoft Graph APIs for OneDrive and SharePoint. Using the Graph APIs requires obtaining access to a user's OneDrive folder (for personal and groupchat files) or the files in a team's channels (for channel files) through the standard OAuth 2.0 authorization flow. This method works in all Teams scopes.
Thanks,
Sayali
--------------------------------------------------------------------------------------------
If the response is helpful, please click Mark as Best Response and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.
- Praveena5Feb 07, 2022Copper Contributor